Bug #20490
closedrgw: can not list buckets when enable s3 website hosting and use domain
0%
Description
hi all,
i rencently test s3 website hosting on ceph radosgw, and i found some problem.
in my ceph.conf
rgw enable static website = 1
rgw_dns_s3website_name = eos.cloud.com
rgw_dns_name = eos.cloud.com
rgw_resolve_cname = true
[root@dev build]# nslookup eos.cloud.com
Server: 192.168.153.140
Address: 192.168.153.140#53
Name: eos.cloud.com
Address: 192.168.153.153
and when curl http://eos.cloud.com ,it return 404 error
[root@dev ~]# curl http://eos.cloud.com -v- About to connect() to eos.cloud.com port 80 (#0)
- Trying 192.168.153.153...
- Connected to eos.cloud.com (192.168.153.153) port 80 (#0)
< HTTP/1.1 404 Not FoundGET / HTTP/1.1
User-Agent: curl/7.29.0
Host: eos.cloud.com
Accept: */*
< Content-Length: 233
< x-amz-request-id: tx000000000000000000008-00595af5f0-1018-default
< Accept-Ranges: bytes
< Content-Type: text/html
< Date: Tue, 04 Jul 2017 01:57:04 GMT
<
- Excess found in a non pipelined read: excess = 26, size = 233, maxdownload = 233, bytecount = 0
<html>
<head><title>404 Not Found</title></head>
<body>
<h1>404 Not Found</h1>
<ul>
<li>Code: NoSuchBucket</li>
<li>RequestId: tx000000000000000000008-00595af5f0-1018-default</li>
<li>HostId: 1018-default-default</li> - Connection #0 to host eos.cloud.com left intact
but when disable website hosting with comment
- rgw enable static website = 1
- rgw_dns_s3website_name = eos.cloud.com
rgw_dns_name = eos.cloud.com
rgw_resolve_cname = true
it can success list bucket
[root@dev build]# curl eos.cloud.com
<ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>anonymous</ID><DisplayName></DisplayName></Owner><Buckets></Buckets></ListAllMyBucketsResult>
so is it some where i configure wrong?
and after enable website hosting ,all operation is failed with domain request
list bucket
< GET / HTTP/1.1
< Host: eos.cloud.com:80
< Connection: keep-alive
< Accept-Encoding: gzip, deflate
< Accept: */*
< User-Agent: python-requests/2.11.1
< date: Tue, 04 Jul 2017 02:07:49 GMT
< Authorization: AWS yly:5E4FlTXWRaupv1JghwJBfXfguos=
<
HTTP/1.1 404 Not Found
Content-Length: 233
x-amz-request-id: tx000000000000000000002-00595af875-101a-default
Accept-Ranges: bytes
Content-Type: text/html
Date: Tue, 04 Jul 2017 02:07:49 GMT
Connection: Keep-Alive
<html>
<head><title>404 Not Found</title></head>
<body>
<h1>404 Not Found</h1>
<ul>
<li>Code: NoSuchBucket</li>
<li>RequestId: tx000000000000000000002-00595af875-101a-default</li>
<li>HostId: 101a-default-default</li>
create bucket
[root@dev ~]# ceph-request put /bucket1 -c eos.ceph-request --verbose
< PUT /bucket1 HTTP/1.1
< Host: eos.cloud.com:80
< Connection: keep-alive
< Accept-Encoding: gzip, deflate
< Accept: */*
< User-Agent: python-requests/2.11.1
< Content-Length: 0
< date: Tue, 04 Jul 2017 02:09:08 GMT
< Authorization: AWS yly:rTih/vVINz1uMaaYQqZzJLQlnT0=
<
HTTP/1.1 405 Method Not Allowed
Content-Length: 255
x-amz-request-id: tx000000000000000000003-00595af8c4-101a-default
Accept-Ranges: bytes
Content-Type: text/html
Date: Tue, 04 Jul 2017 02:09:08 GMT
Connection: Keep-Alive
<html>
<head><title>405 Method Not Allowed</title></head>
<body>
<h1>405 Method Not Allowed</h1>
<ul>
<li>Code: MethodNotAllowed</li>
<li>RequestId: tx000000000000000000003-00595af8c4-101a-default</li>
<li>HostId: 101a-default-default</li>
Updated by Yehuda Sadeh almost 7 years ago
Can you provide more logs?
debug rgw = 20 debug ms = 1
Updated by Orit Wasserman almost 7 years ago
- Status changed from New to Need More Info
Updated by joke lee over 6 years ago
hi, i found the reason,i set rgw_dns_s3website_name and rgw_dns_name the same domain and use the same port for s3 and website s3, this make rgw use website s3 instead s3 , set diffrent port or diffrent domain can fix this problem. this can be closed now . thks
Updated by Casey Bodley over 6 years ago
- Status changed from Need More Info to Closed