[GH-ISSUE #1262] s3fs return http response code 200 but bucket not mount #679

Closed
opened 2026-03-04 01:47:49 +03:00 by kerem · 1 comment
Owner

Originally created by @handelay on GitHub (Apr 9, 2020).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1262

Additional Information

Version of s3fs being used (s3fs --version)

Amazon Simple Storage Service File System V1.82(commit:unknown) with GnuTLS(gcrypt)

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)

2.9.7

Kernel information (uname -r)

4.15.0-1057-aws

GNU/Linux Distribution, if applicable (cat /etc/os-release)

NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

s3fs command line used, if applicable

s3fs mybucket /s3bucket -o passwd_file=.passwd-s3fs -f -d -o dbglevel=info -o curldbg

/etc/fstab entry, if applicable

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

[CRT] s3fs.cpp:set_s3fs_log_level(257): change debug level from [CRT] to [INF]
[INF] s3fs.cpp:set_mountpoint_attribute(4193): PROC(uid=1000, gid=1000) - MountPoint(uid=0, gid=0, mode=40777)
[CRT] s3fs.cpp:s3fs_init(3378): init v1.82(commit:unknown) with GnuTLS(gcrypt)
[INF] s3fs.cpp:s3fs_check_service(3754): check services.
[INF] curl.cpp:CheckBucket(2914): check a bucket.
[INF] curl.cpp:prepare_url(4205): URL is https://s3.amazonaws.com/mybucket/
[INF] curl.cpp:prepare_url(4237): URL changed is https://mybucket.amazonaws.com/
[INF] curl.cpp:insertV4Headers(2267): computing signature [GET] [/] [] []
[INF] curl.cpp:url_to_host(100): url is https://s3.amazonaws.com

  • Trying 52.219.100.180...
  • TCP_NODELAY set
  • Connected to mybucket.amazonaws.com (52.219.100.180) port 443 (#0)
  • found 133 certificates in /etc/ssl/certs/ca-certificates.crt
  • found 399 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: Sat, 09 Nov 2019 00:00:00 GMT
  • expire date: Fri, 12 Mar 2021 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 / HTTP/1.1
host: mybucket.amazonaws.com
User-Agent: s3fs/1.82 (commit hash unknown; GnuTLS(gcrypt))
Accept: /
Removing credentials in case these are private

< HTTP/1.1 400 Bad Request
< x-amz-bucket-region: us-east-2
< x-amz-request-id: 613AA5813D45EA62
< x-amz-id-2: jUGYd82dBcq0twXyfuF05fPYywzmKr48P962zn7aHYqjajSBY5nxWw6Ystds5yTVcua6d+gpHO8=
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Thu, 09 Apr 2020 12:44:37 GMT
< Connection: close
< Server: AmazonS3
<

  • Closing connection 0
    [INF] curl.cpp:RequestPerform(1952): HTTP response code 400 was returned, returning EIO.
    [ERR] curl.cpp:CheckBucket(2953): Check bucket failed, S3 response:
    AuthorizationHeaderMalformedThe authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-east-2'us-east-2613AA5813D45EA62jUGYd82dBcq0twXyfuF05fPYywzmKr48P962zn7aHYqjajSBY5nxWw6Ystds5yTVcua6d+gpHO8=
    [CRT] s3fs.cpp:s3fs_check_service(3775): Could not connect wrong region us-east-1, so retry to connect region us-east-2.
    [INF] curl.cpp:CheckBucket(2914): check a bucket.
    [INF] curl.cpp:prepare_url(4205): URL is https://s3-us-east-2.amazonaws.com/vandelaytestbucket/
    [INF] curl.cpp:prepare_url(4237): URL changed is https://mybucket-us-east-2.amazonaws.com/
    [INF] curl.cpp:insertV4Headers(2267): computing signature [GET] [/] [] []
    [INF] curl.cpp:url_to_host(100): url is https://s3-us-east-2.amazonaws.com
  • Trying 52.219.100.64...
  • TCP_NODELAY set
  • Connected to mybucket-us-east-2.amazonaws.com (52.219.100.64) port 443 (#1)
  • found 133 certificates in /etc/ssl/certs/ca-certificates.crt
  • found 399 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.us-east-2.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.us-east-2.amazonaws.com
  • start date: Fri, 31 Jan 2020 00:00:00 GMT
  • expire date: Thu, 27 May 2021 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 / HTTP/1.1
host: vandelaytestbucket.s3-us-east-2.amazonaws.com
User-Agent: s3fs/1.82 (commit hash unknown; GnuTLS(gcrypt))
Accept: /
Removing credentials in case these are private

< HTTP/1.1 200 OK
< x-amz-id-2: rdhmHAFIYHGo+kzBsR/bnQRMeHhgdWSWuhG8G+0eH1e/cs31xMLnhgizNu9BX7a0+bhtS/uHJ0g=
< x-amz-request-id: 34D3A618D943ECA7
< Date: Thu, 09 Apr 2020 12:44:38 GMT
< x-amz-bucket-region: us-east-2
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Server: AmazonS3
<

  • Connection #1 to host mybucket-us-east-2.amazonaws.com left intact
    [INF] curl.cpp:RequestPerform(1940): HTTP response code 200

Details about issue

I believe this is the same issue as #809
Not sure why it tries us-east-1 first but then correctly goes onto us-east-2.

I installed on an EC2 instance using:
sudo apt-get update
sudo apt-get install s3fs

After this install pkg-config --modversion fuse returned nothing. I would have thought it should be included in the s3fs install but I installed manually with:
sudo apt-get install libfuse-dev libcurl4-openssl-dev libxml++2.6-dev libssl-dev

mounting the s3 bucket appears to hang indefinitely on:
curl.cpp:RequestPerform(1940): HTTP response code 200

Originally created by @handelay on GitHub (Apr 9, 2020). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1262 ### Additional Information #### Version of s3fs being used (s3fs --version) Amazon Simple Storage Service File System V1.82(commit:unknown) with GnuTLS(gcrypt) #### Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse) 2.9.7 #### Kernel information (uname -r) 4.15.0-1057-aws #### GNU/Linux Distribution, if applicable (cat /etc/os-release) NAME="Ubuntu" VERSION="18.04.3 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.3 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic #### s3fs command line used, if applicable s3fs mybucket /s3bucket -o passwd_file=.passwd-s3fs -f -d -o dbglevel=info -o curldbg #### /etc/fstab entry, if applicable ``` ``` #### s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs) [CRT] s3fs.cpp:set_s3fs_log_level(257): change debug level from [CRT] to [INF] [INF] s3fs.cpp:set_mountpoint_attribute(4193): PROC(uid=1000, gid=1000) - MountPoint(uid=0, gid=0, mode=40777) [CRT] s3fs.cpp:s3fs_init(3378): init v1.82(commit:unknown) with GnuTLS(gcrypt) [INF] s3fs.cpp:s3fs_check_service(3754): check services. [INF] curl.cpp:CheckBucket(2914): check a bucket. [INF] curl.cpp:prepare_url(4205): URL is https://s3.amazonaws.com/mybucket/ [INF] curl.cpp:prepare_url(4237): URL changed is https://mybucket.amazonaws.com/ [INF] curl.cpp:insertV4Headers(2267): computing signature [GET] [/] [] [] [INF] curl.cpp:url_to_host(100): url is https://s3.amazonaws.com * Trying 52.219.100.180... * TCP_NODELAY set * Connected to mybucket.amazonaws.com (52.219.100.180) port 443 (#0) * found 133 certificates in /etc/ssl/certs/ca-certificates.crt * found 399 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: Sat, 09 Nov 2019 00:00:00 GMT * expire date: Fri, 12 Mar 2021 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 / HTTP/1.1 host: mybucket.amazonaws.com User-Agent: s3fs/1.82 (commit hash unknown; GnuTLS(gcrypt)) Accept: */* ***Removing credentials in case these are private*** < HTTP/1.1 400 Bad Request < x-amz-bucket-region: us-east-2 < x-amz-request-id: 613AA5813D45EA62 < x-amz-id-2: jUGYd82dBcq0twXyfuF05fPYywzmKr48P962zn7aHYqjajSBY5nxWw6Ystds5yTVcua6d+gpHO8= < Content-Type: application/xml < Transfer-Encoding: chunked < Date: Thu, 09 Apr 2020 12:44:37 GMT < Connection: close < Server: AmazonS3 < * Closing connection 0 [INF] curl.cpp:RequestPerform(1952): HTTP response code 400 was returned, returning EIO. [ERR] curl.cpp:CheckBucket(2953): Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AuthorizationHeaderMalformed</Code><Message>The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-east-2'</Message><Region>us-east-2</Region><RequestId>613AA5813D45EA62</RequestId><HostId>jUGYd82dBcq0twXyfuF05fPYywzmKr48P962zn7aHYqjajSBY5nxWw6Ystds5yTVcua6d+gpHO8=</HostId></Error> [CRT] s3fs.cpp:s3fs_check_service(3775): Could not connect wrong region us-east-1, so retry to connect region us-east-2. [INF] curl.cpp:CheckBucket(2914): check a bucket. [INF] curl.cpp:prepare_url(4205): URL is https://s3-us-east-2.amazonaws.com/vandelaytestbucket/ [INF] curl.cpp:prepare_url(4237): URL changed is https://mybucket-us-east-2.amazonaws.com/ [INF] curl.cpp:insertV4Headers(2267): computing signature [GET] [/] [] [] [INF] curl.cpp:url_to_host(100): url is https://s3-us-east-2.amazonaws.com * Trying 52.219.100.64... * TCP_NODELAY set * Connected to mybucket-us-east-2.amazonaws.com (52.219.100.64) port 443 (#1) * found 133 certificates in /etc/ssl/certs/ca-certificates.crt * found 399 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.us-east-2.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.us-east-2.amazonaws.com * start date: Fri, 31 Jan 2020 00:00:00 GMT * expire date: Thu, 27 May 2021 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 / HTTP/1.1 host: vandelaytestbucket.s3-us-east-2.amazonaws.com User-Agent: s3fs/1.82 (commit hash unknown; GnuTLS(gcrypt)) Accept: */* ***Removing credentials in case these are private*** < HTTP/1.1 200 OK < x-amz-id-2: rdhmHAFIYHGo+kzBsR/bnQRMeHhgdWSWuhG8G+0eH1e/cs31xMLnhgizNu9BX7a0+bhtS/uHJ0g= < x-amz-request-id: 34D3A618D943ECA7 < Date: Thu, 09 Apr 2020 12:44:38 GMT < x-amz-bucket-region: us-east-2 < Content-Type: application/xml < Transfer-Encoding: chunked < Server: AmazonS3 < * Connection #1 to host mybucket-us-east-2.amazonaws.com left intact [INF] curl.cpp:RequestPerform(1940): HTTP response code 200 ### Details about issue I believe this is the same issue as #809 Not sure why it tries us-east-1 first but then correctly goes onto us-east-2. I installed on an EC2 instance using: sudo apt-get update sudo apt-get install s3fs After this install pkg-config --modversion fuse returned nothing. I would have thought it should be included in the s3fs install but I installed manually with: sudo apt-get install libfuse-dev libcurl4-openssl-dev libxml++2.6-dev libssl-dev mounting the s3 bucket appears to hang indefinitely on: curl.cpp:RequestPerform(1940): HTTP response code 200
kerem closed this issue 2026-03-04 01:47:49 +03:00
Author
Owner

@handelay commented on GitHub (Apr 10, 2020):

I believe I have solved this problem - I removed the IAM role from the EC2 instance launch, now leaving it blank. Probably there is a silent inconsistency between attaching an IAM role to the instance and supplying IAM user credentials.

<!-- gh-comment-id:611933242 --> @handelay commented on GitHub (Apr 10, 2020): I believe I have solved this problem - I removed the IAM role from the EC2 instance launch, now leaving it blank. Probably there is a silent inconsistency between attaching an IAM role to the instance and supplying IAM user credentials.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#679
No description provided.