[GH-ISSUE #825] Fail to mount on Ubuntu 18.04.1 LTS #478

Closed
opened 2026-03-04 01:45:58 +03:00 by kerem · 5 comments
Owner

Originally created by @javapenguin on GitHub (Sep 21, 2018).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/825

Installed like so:

apt-get update
apt-get install s3fs
echo "${ACCESS_KEY_ID}:${SECRET_ACCESS_KEY}" >  ~/.passwd-s3fs
chmod 600  ~/.passwd-s3fs
cat  ~/.passwd-s3fs
mkdir /share
s3fs download.quotadev.momentum.co.za /share -o passwd_file=~/.passwd-s3fs -o use_path_request_style -o dbglevel=info -f -o curldbg

This is the debug output:

[CRT] s3fs.cpp:set_s3fs_log_level(257): change debug level from [CRT] to [INF] 
[INF]     s3fs.cpp:set_mountpoint_attribute(4193): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40700)
[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/download.quotadev.momentum.co.za/
[INF]       curl.cpp:prepare_url(4237): URL changed is https://s3.amazonaws.com/download.quotadev.momentum.co.za/
[INF]       curl.cpp:insertV4Headers(2267): computing signature [GET] [/] [] []
[INF]       curl.cpp:url_to_host(100): url is https://s3.amazonaws.com
*   Trying 52.216.229.45...
* TCP_NODELAY set
* Connected to s3.amazonaws.com (52.216.229.45) 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: Thu, 02 Aug 2018 00:00:00 GMT
*        expire date: Fri, 25 Oct 2019 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 /download.quotadev.momentum.co.za/ HTTP/1.1
host: s3.amazonaws.com
User-Agent: s3fs/1.82 (commit hash unknown; GnuTLS(gcrypt))
Accept: */*
Authorization: AWS4-HMAC-SHA256 Credential=AKIAJHMGIRXLNJTEQGWQ/20180921/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=7824194f025aea1e72fa7b01b4c1f449e56209616e0e1c4d82c5811b167c6287
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date: 20180921T093957Z

< HTTP/1.1 301 Moved Permanently
< x-amz-bucket-region: eu-west-1
< x-amz-request-id: C982B17E88638120
< x-amz-id-2: UUyeKz6qRhXIn6/9OisNwz+WakYpy2MyCJ6CZfKhQ7A1AW3i3FHApsMXckECp4dWM8oETmXvumI=
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Fri, 21 Sep 2018 09:39:57 GMT
< Server: AmazonS3
< 
* Connection #0 to host s3.amazonaws.com left intact
[INF]       curl.cpp:RequestPerform(1940): HTTP response code 301

Originally created by @javapenguin on GitHub (Sep 21, 2018). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/825 Installed like so: ```` apt-get update apt-get install s3fs echo "${ACCESS_KEY_ID}:${SECRET_ACCESS_KEY}" > ~/.passwd-s3fs chmod 600 ~/.passwd-s3fs cat ~/.passwd-s3fs mkdir /share s3fs download.quotadev.momentum.co.za /share -o passwd_file=~/.passwd-s3fs -o use_path_request_style -o dbglevel=info -f -o curldbg ```` This is the debug output: ```` [CRT] s3fs.cpp:set_s3fs_log_level(257): change debug level from [CRT] to [INF] [INF] s3fs.cpp:set_mountpoint_attribute(4193): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40700) [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/download.quotadev.momentum.co.za/ [INF] curl.cpp:prepare_url(4237): URL changed is https://s3.amazonaws.com/download.quotadev.momentum.co.za/ [INF] curl.cpp:insertV4Headers(2267): computing signature [GET] [/] [] [] [INF] curl.cpp:url_to_host(100): url is https://s3.amazonaws.com * Trying 52.216.229.45... * TCP_NODELAY set * Connected to s3.amazonaws.com (52.216.229.45) 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: Thu, 02 Aug 2018 00:00:00 GMT * expire date: Fri, 25 Oct 2019 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 /download.quotadev.momentum.co.za/ HTTP/1.1 host: s3.amazonaws.com User-Agent: s3fs/1.82 (commit hash unknown; GnuTLS(gcrypt)) Accept: */* Authorization: AWS4-HMAC-SHA256 Credential=AKIAJHMGIRXLNJTEQGWQ/20180921/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=7824194f025aea1e72fa7b01b4c1f449e56209616e0e1c4d82c5811b167c6287 x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 x-amz-date: 20180921T093957Z < HTTP/1.1 301 Moved Permanently < x-amz-bucket-region: eu-west-1 < x-amz-request-id: C982B17E88638120 < x-amz-id-2: UUyeKz6qRhXIn6/9OisNwz+WakYpy2MyCJ6CZfKhQ7A1AW3i3FHApsMXckECp4dWM8oETmXvumI= < Content-Type: application/xml < Transfer-Encoding: chunked < Date: Fri, 21 Sep 2018 09:39:57 GMT < Server: AmazonS3 < * Connection #0 to host s3.amazonaws.com left intact [INF] curl.cpp:RequestPerform(1940): HTTP response code 301 ````
kerem closed this issue 2026-03-04 01:45:58 +03:00
Author
Owner

@hudsantos commented on GitHub (Oct 20, 2018):

Still facing this?
Pleas refer to: https://github.com/s3fs-fuse/s3fs-fuse/issues/706
It seems to be a credential issue, or even endpoint region issue.

Just registering: I've mounted successfully either with Ubuntu 16.04 and Ubuntu 18.04.1 LTS running within Docker and image based on this Dockerfile: https://github.com/xueshanf/docker-s3fs/blob/master/Dockerfile

root@af46230aa4b4:/# cat /etc/issue
Ubuntu 18.04.1 LTS \n \l
root@af46230aa4b4:/# uname -a
Linux af46230aa4b4 4.4.0-116-generic #140~14.04.1-Ubuntu SMP Fri Feb 16 09:25:20 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
root@af46230aa4b4:/# df -h | grep backup
s3fs            256T     0  256T   0% /backup
root@af46230aa4b4:/# grep s3fs /etc/mtab
s3fs /backup fuse.s3fs rw,nosuid,nodev,relatime,user_id=0,group_id=0 0 0
root@af46230aa4b4:/#

The environment was created with:

  1. Build the image:
    # docker build -t hudsantos/docker-s3fs .
  2. Run the container with mknod and sys_admin capabilities:
    # docker run --cap-add mknod --cap-add sys_admin --device=/dev/fuse -v /path/to/my/passwd-s3fs:/etc/passwd-s3fs -it hudsantos/docker-s3fs bash
  3. Mount inside the container:
    # s3fs my_bucket_name -o use_cache=/tmp /backup
<!-- gh-comment-id:431625399 --> @hudsantos commented on GitHub (Oct 20, 2018): Still facing this? Pleas refer to: https://github.com/s3fs-fuse/s3fs-fuse/issues/706 It seems to be a credential issue, or even endpoint region issue. Just registering: I've mounted successfully either with Ubuntu 16.04 and Ubuntu 18.04.1 LTS running within Docker and image based on this Dockerfile: https://github.com/xueshanf/docker-s3fs/blob/master/Dockerfile ``` root@af46230aa4b4:/# cat /etc/issue Ubuntu 18.04.1 LTS \n \l root@af46230aa4b4:/# uname -a Linux af46230aa4b4 4.4.0-116-generic #140~14.04.1-Ubuntu SMP Fri Feb 16 09:25:20 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux root@af46230aa4b4:/# df -h | grep backup s3fs 256T 0 256T 0% /backup root@af46230aa4b4:/# grep s3fs /etc/mtab s3fs /backup fuse.s3fs rw,nosuid,nodev,relatime,user_id=0,group_id=0 0 0 root@af46230aa4b4:/# ``` The environment was created with: 1. Build the image: `# docker build -t hudsantos/docker-s3fs .` 2. Run the container with mknod and sys_admin capabilities: `# docker run --cap-add mknod --cap-add sys_admin --device=/dev/fuse -v /path/to/my/passwd-s3fs:/etc/passwd-s3fs -it hudsantos/docker-s3fs bash` 3. Mount inside the container: `# s3fs my_bucket_name -o use_cache=/tmp /backup`
Author
Owner

@gaul commented on GitHub (Apr 9, 2019):

Could you retest with 1.85? It includes better 301 handling. However setting the url will likely resolve your symptoms.

<!-- gh-comment-id:481181996 --> @gaul commented on GitHub (Apr 9, 2019): Could you retest with 1.85? It includes better 301 handling. However setting the url will likely resolve your symptoms.
Author
Owner

@sbellver commented on GitHub (Jun 17, 2019):

Same here.

s3fs 1.85

< HTTP/1.1 400 Bad Request
< x-amz-bucket-region: eu-central-1
< x-amz-request-id: 3FF8FFEB9776950B
< x-amz-id-2: inrFBrGhsVPMkzq+jqHqlXM8b3QJG+z7+ArBz7FHUgHru9bwFOYr69ISAGwUR3clf6i1sH8LVy8=
< x-amz-region: eu-central-1
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Mon, 17 Jun 2019 11:02:35 GMT
< Connection: close
< Server: AmazonS3
<
* Closing connection 0
[ERR] curl.cpp:RequestPerform(2263): HTTP response code 400, returning EIO. Body Text: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidRequest</Code><Message>**The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.**</Message><RequestId>3FF8FFEB9776950B</RequestId><HostId>inrFBrGhsVPMkzq+jqHqlXM8b3QJG+z7+ArBz7FHUgHru9bwFOYr69ISAGwUR3clf6i1sH8LVy8=</HostId></Error>
[ERR] curl.cpp:CheckBucket(3299): Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidRequest</Code><Message>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.</Message><RequestId>3FF8FFEB9776950B</RequestId><HostId>inrFBrGhsVPMkzq+jqHqlXM8b3QJG+z7+ArBz7FHUgHru9bwFOYr69ISAGwUR3clf6i1sH8LVy8=</HostId></Error>
[CRT] s3fs.cpp:s3fs_check_service(3869): Bad Request(host=https://s3.amazonaws.com) - result of checking service.
[ERR] s3fs.cpp:s3fs_exit_fuseloop(3448): Exiting FUSE event loop due to errors

[INF] s3fs.cpp:s3fs_destroy(3511): destroy

I think The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256. is the key.

I'm on west-3 region (Paris)

<!-- gh-comment-id:502637918 --> @sbellver commented on GitHub (Jun 17, 2019): Same here. s3fs 1.85 ``` < HTTP/1.1 400 Bad Request < x-amz-bucket-region: eu-central-1 < x-amz-request-id: 3FF8FFEB9776950B < x-amz-id-2: inrFBrGhsVPMkzq+jqHqlXM8b3QJG+z7+ArBz7FHUgHru9bwFOYr69ISAGwUR3clf6i1sH8LVy8= < x-amz-region: eu-central-1 < Content-Type: application/xml < Transfer-Encoding: chunked < Date: Mon, 17 Jun 2019 11:02:35 GMT < Connection: close < Server: AmazonS3 < * Closing connection 0 [ERR] curl.cpp:RequestPerform(2263): HTTP response code 400, returning EIO. Body Text: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>InvalidRequest</Code><Message>**The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.**</Message><RequestId>3FF8FFEB9776950B</RequestId><HostId>inrFBrGhsVPMkzq+jqHqlXM8b3QJG+z7+ArBz7FHUgHru9bwFOYr69ISAGwUR3clf6i1sH8LVy8=</HostId></Error> [ERR] curl.cpp:CheckBucket(3299): Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>InvalidRequest</Code><Message>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.</Message><RequestId>3FF8FFEB9776950B</RequestId><HostId>inrFBrGhsVPMkzq+jqHqlXM8b3QJG+z7+ArBz7FHUgHru9bwFOYr69ISAGwUR3clf6i1sH8LVy8=</HostId></Error> [CRT] s3fs.cpp:s3fs_check_service(3869): Bad Request(host=https://s3.amazonaws.com) - result of checking service. [ERR] s3fs.cpp:s3fs_exit_fuseloop(3448): Exiting FUSE event loop due to errors [INF] s3fs.cpp:s3fs_destroy(3511): destroy ``` I think **The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.** is the key. I'm on west-3 region (Paris)
Author
Owner

@sbellver commented on GitHub (Jun 17, 2019):

If you use a different region seems to be necessary url=https://s3-eu-west-3.amazonaws.com instead region

And if you use dot at your bucket you need to add use_path_request_style

It works:

s3fs bucket.name.dots /mountPoint -o passwd_file=/etc/passwd-s3fs -o use_path_request_style

<!-- gh-comment-id:502642671 --> @sbellver commented on GitHub (Jun 17, 2019): If you use a different region seems to be necessary url=https://s3-eu-west-3.amazonaws.com instead region And if you use dot at your bucket you need to add use_path_request_style It works: `s3fs bucket.name.dots /mountPoint -o passwd_file=/etc/passwd-s3fs -o use_path_request_style `
Author
Owner

@gaul commented on GitHub (Jun 25, 2019):

Please reopen if the suggested workaround does not address your symptoms.

<!-- gh-comment-id:505609661 --> @gaul commented on GitHub (Jun 25, 2019): Please reopen if the suggested workaround does not address your symptoms.
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#478
No description provided.