New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bucket name includes dots + use_path_request_style + eu-central-1; Gives 301 Moved Permanently #693

Open
catavan opened this Issue Nov 27, 2017 · 8 comments

Comments

Projects
None yet
5 participants
@catavan

catavan commented Nov 27, 2017

Version of s3fs being used

Amazon Simple Storage Service File System V1.82(commit:566961c) with OpenSSL

Version of fuse being used

2.9.7

System information

4.13.0-17-generic

Distro

Ubuntu 17.10

s3fs command line used

s3fs my.working.bucket.name /home/me/s3 -o use_path_request_style -o endpoint=eu-central-1 -o passwd_file=/etc/passwd-s3fs -o curldbg -f

s3fs syslog messages (grep s3fs /var/log/syslog, or s3fs outputs)

`[INF] s3fs.cpp:s3fs_init(3371): init v1.82(commit:566961c) with OpenSSL

  • Trying 54.231.98.203...
  • TCP_NODELAY set
  • Connected to s3.amazonaws.com (54.231.98.203) port 443 (#0)
  • found 148 certificates in /etc/ssl/certs/ca-certificates.crt
  • found 595 certificates in /etc/ssl/certs
  • ALPN, offering http/1.1
  • SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
  • server certificate verification OK
  • server certificate status verification SKIPPED
  • common name: s3.amazonaws.com (matched)
  • server certificate expiration date OK
  • server certificate activation date OK
  • certificate public key: RSA
  • certificate version: #3
  • subject: C=US,ST=Washington,L=Seattle,O=Amazon.com Inc.,CN=s3.amazonaws.com
  • start date: Tue, 26 Sep 2017 00:00:00 GMT
  • expire date: Thu, 20 Sep 2018 12:00:00 GMT
  • issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert Baltimore CA-2 G2
  • compression: NULL
  • ALPN, server did not agree to a protocol

GET /my.working.bucket.name/ HTTP/1.1
host: s3.amazonaws.com
User-Agent: s3fs/1.82 (commit hash 566961c; OpenSSL)
Accept: /
Authorization: AWS4-HMAC-SHA256 Credential=AKIAILS2DKV4WVE2MUBA/20171127/eu-central-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=364abd3e5b561a9a71a35f28264a5700f6e546d66f96b7648fa9102d0600b35c
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date: 20171127T155745Z

< HTTP/1.1 301 Moved Permanently
< x-amz-bucket-region: eu-central-1
< x-amz-request-id: ACC928843271B61C
< x-amz-id-2: /zO0/tq1K1JyaIAoJmWmg0A94Iud8HAQMRIRJ/S/+N/3H4xV9m+ql2MqdxCSG4N3WM4qirwmBQQ=
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Mon, 27 Nov 2017 15:57:45 GMT
< Server: AmazonS3
<

  • Connection #0 to host s3.amazonaws.com left intact`

Details about issue

Hi guys

I have a bucket on eu-central-1 and with dots in the bucket name and after some investigation I found the FAQ page (https://github.com/s3fs-fuse/s3fs-fuse/wiki/FAQ#q-https-connecting-failed-if-bucket-name-includes-dod)

Tried to mount using "-o use_path_request_style -o endpoint=eu-central-1":
s3fs my.working.bucket.name /home/me/s3 -o use_path_request_style -o endpoint=eu-central-1 -o passwd_file=/etc/passwd-s3fs -o curldbg -f

It seams I got a 301 in the response and the mounted folder is "empty"

HTTP/1.1 301 Moved Permanently  
x-amz-bucket-region: eu-central-1

I am doing something wrong with the options ? Some help will be really appreciated!
THX!

@catavan catavan changed the title from (x-amz-bucket-region: eu-central-1 301 Moved Permanently) Bucket name includes dots + use_path_request_style to Bucket name includes dots + use_path_request_style + eu-central-1; Gives 301 Moved Permanently Nov 27, 2017

@haydenyoung

This comment has been minimized.

haydenyoung commented Jan 5, 2018

Can confirm the same problem for eu-west-2 region (London).

HTTP/1.1 301 Moved Permanently

Using

s3fs bucket /media/bucket -o passwd_file=/etc/s3fs-pwd,use_path_request_style,endpoint=eu-west-2,curldbg -ouid=1001,gid=1001,allow_other,mp_umask=002 -o sigv2 -o nocopyapi

Problem causes any file I try to edit using vim to be readonly. When I try to exit the file it seems to get stuck in some kind of infinite loop and I have to kill vim.

@haydenyoung

This comment has been minimized.

haydenyoung commented Jan 5, 2018

Can confirm that changing my bucket from my.bucket.for.mounting to my-bucket-for-mounting fixes the problem so it appears the issues related to "use_path_request_style"?

@Kusmarius

This comment has been minimized.

Kusmarius commented Jan 22, 2018

It have nothing to do with dots.
My bucket name is formatted like this x-xxx-xxx and still getting 301 moved

@vash1486

This comment has been minimized.

vash1486 commented Jan 29, 2018

same problem here with eu-west-1
s3fs my.bucket.name /mnt/s3/ -o passwd_file=/etc/passwd-s3fs -o dbglevel=info -f -o curldbg -o use_path_request_style -o endpoint=eu-west-1

P.s. Os and version are the same as @catavan

@rymesaint

This comment has been minimized.

rymesaint commented Feb 19, 2018

try this :
s3fs bucketName /mountpoint -o passwd_file=/etc/passwd-s3fs -o use_path_request_style -o url=http://s3-your endpoint.amazonaws.com

@vash1486

This comment has been minimized.

vash1486 commented Feb 19, 2018

hi, @rymesaint! unfortunately I have the same problem with your suggestion :(
s3fs bucket.name /mnt/s3 -o passwd_file=/etc/passwd-s3fs -o use_path_request_style -o url=http://s3-eu-west-1.amazonaws.com -o dbglevel=info -f -o curldbg

@rymesaint

This comment has been minimized.

rymesaint commented Feb 20, 2018

@vash1486 What's your log error? Can you share it?

@vash1486

This comment has been minimized.

vash1486 commented Feb 20, 2018

ops, my mistake! trying again, it worked fine! thanks @rymesaint 👍 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment