[GH-ISSUE #1377] Bucket Not found - error #738

Open
opened 2026-03-04 01:48:19 +03:00 by kerem · 2 comments
Owner

Originally created by @sanhardik on GitHub (Aug 21, 2020).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1377

I am trying to setup FTP server with multiple users mounted with their individual folders inside S3 bucket.
I get Bucket Not Found error saying that the Key is not found. But when I look at the S3 Bucket, I can see the folder there.

Version of s3fs being used (s3fs --version). 1.86

Version of fuse being used pkg-config --modversion fuse 2.9.2

Kernel information (uname -r)

uname -r
4.14.186-146.268.amzn2.x86_64

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

cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

s3fs command line used, if applicable

sudo s3fs test-bucket:/test2 /home/test2/ftp/files -o iam_role="EC2-S3FTPPolicy",allow_other -d -o endpoint="ap-southeast-2" -o curldbg -f

Details about issue

Debug Log

[CRT] s3fs.cpp:set_s3fs_log_level(297): change debug level from [CRT] to [INF] 
[INF]     s3fs.cpp:set_mountpoint_attribute(4401): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40755)
[INF] s3fs.cpp:s3fs_init(3493): init v1.86(commit:unknown) with OpenSSL
[INF] s3fs.cpp:s3fs_check_service(3828): check services.
[INF]       curl.cpp:GetIAMCredentials(2862): [IAM role=EC2-S3FTPPolicy]
*   Trying 169.254.169.254...
* TCP_NODELAY set
* Connected to 169.254.169.254 (169.254.169.254) port 80 (#0)
> GET /latest/meta-data/iam/security-credentials/EC2-S3FTPPolicy HTTP/1.1
Host: 169.254.169.254
User-Agent: s3fs/1.86 (commit hash unknown; OpenSSL)
Accept: */*

* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Accept-Ranges: bytes
< Content-Length: 1318
< Content-Type: text/plain
< Date: Fri, 21 Aug 2020 22:29:01 GMT
< Last-Modified: Fri, 21 Aug 2020 22:06:54 GMT
< Connection: close
< Server: EC2ws
< 
* Closing connection 0
[INF]       curl.cpp:RequestPerform(2416): HTTP response code 200
[INF]       curl.cpp:SetIAMCredentials(1870): IAM credential response = "{
  "Code" : "Success",
  "LastUpdated" : "2020-08-21T22:06:05Z",
  "Type" : "AWS-HMAC",
  "AccessKeyId" : "ASIA2K4QCPJITSPKOMH7",
  "SecretAccessKey" : "QHn0pdTaLQ0tWuhvqZ1VeqZbGjADlA+itloakd2N",
  "Token" : "xxxxxxxxx",
  "Expiration" : "2020-08-22T04:22:25Z"
}"
[INF] curl.cpp:ReturnHandler(318): Pool full: destroy the oldest handler
[INF]       curl.cpp:CheckBucket(3413): check a bucket.
[INF]       curl.cpp:prepare_url(4703): URL is https://s3.amazonaws.com/test-bucket/test2/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://test-bucket.s3.amazonaws.com/test2/
[INF]       curl.cpp:insertV4Headers(2753): computing signature [GET] [/test2/] [] []
[INF]       curl.cpp:url_to_host(99): url is https://s3.amazonaws.com
*   Trying 52.95.128.36...
* TCP_NODELAY set
* Connected to test-bucket.s3.amazonaws.com (52.95.128.36) port 443 (#1)
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* Server certificate:
*  subject: C=US; ST=Washington; L=Seattle; O=Amazon.com, Inc.; CN=*.s3.amazonaws.com
*  start date: Nov  9 00:00:00 2019 GMT
*  expire date: Mar 12 12:00:00 2021 GMT
*  subjectAltName: host "test-bucket.s3.amazonaws.com" matched cert's "*.s3.amazonaws.com"
*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert Baltimore CA-2 G2
*  SSL certificate verify ok.
> GET /test2/ HTTP/1.1
Host: test-bucket.s3.amazonaws.com
User-Agent: s3fs/1.86 (commit hash unknown; OpenSSL)
Accept: */*
Authorization: AWS4-HMAC-SHA256 Credential=ASIA2K4QCPJITSPKOMH7/20200821/ap-southeast-2/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=30200a91553048c5b12509747027884e1ef5c40c7915929c7db8f01fd4983b12
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date: 20200821T222901Z
x-amz-security-token: xxxxxxxx

< HTTP/1.1 404 Not Found
< x-amz-request-id: 6AC7770903DE8A75
< x-amz-id-2: bVkZHH+LUGusPxVXzG2c8HUabfw0q9YpkazXW4JPc7hMMSCDGaSXdmzl6D9HwK/B+IZjAoj03h0=
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Fri, 21 Aug 2020 22:29:01 GMT
< Server: AmazonS3
< 
* Connection #1 to host test-bucket.s3.amazonaws.com left intact
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[ERR] curl.cpp:CheckBucket(3439): Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>test2/</Key><RequestId>6AC7770903DE8A75</RequestId><HostId>bVkZHH+LUGusPxVXzG2c8HUabfw0q9YpkazXW4JPc7hMMSCDGaSXdmzl6D9HwK/B+IZjAoj03h0=</HostId></Error>
[CRT] s3fs.cpp:s3fs_check_service(3901): bucket not found(host=https://s3.amazonaws.com) - result of checking service.
[ERR] s3fs.cpp:s3fs_exit_fuseloop(3483): Exiting FUSE event loop due to errors

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

[ec2-user@ip-172-31-72-248 ~]$ aws s3 ls s3://test-bucket
PRE test1/
PRE test2/
PRE test3/
PRE test4/
PRE test5/

Originally created by @sanhardik on GitHub (Aug 21, 2020). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1377 I am trying to setup FTP server with multiple users mounted with their individual folders inside S3 bucket. I get Bucket Not Found error saying that the Key is not found. But when I look at the S3 Bucket, I can see the folder there. #### Version of s3fs being used (s3fs --version). 1.86 #### Version of fuse being used pkg-config --modversion fuse 2.9.2 #### Kernel information (uname -r) uname -r 4.14.186-146.268.amzn2.x86_64 #### GNU/Linux Distribution, if applicable (cat /etc/os-release) cat /etc/os-release NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" VERSION_ID="2" PRETTY_NAME="Amazon Linux 2" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2" HOME_URL="https://amazonlinux.com/" #### s3fs command line used, if applicable sudo s3fs test-bucket:/test2 /home/test2/ftp/files -o iam_role="EC2-S3FTPPolicy",allow_other -d -o endpoint="ap-southeast-2" -o curldbg -f ### Details about issue Debug Log ``` [CRT] s3fs.cpp:set_s3fs_log_level(297): change debug level from [CRT] to [INF] [INF] s3fs.cpp:set_mountpoint_attribute(4401): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40755) [INF] s3fs.cpp:s3fs_init(3493): init v1.86(commit:unknown) with OpenSSL [INF] s3fs.cpp:s3fs_check_service(3828): check services. [INF] curl.cpp:GetIAMCredentials(2862): [IAM role=EC2-S3FTPPolicy] * Trying 169.254.169.254... * TCP_NODELAY set * Connected to 169.254.169.254 (169.254.169.254) port 80 (#0) > GET /latest/meta-data/iam/security-credentials/EC2-S3FTPPolicy HTTP/1.1 Host: 169.254.169.254 User-Agent: s3fs/1.86 (commit hash unknown; OpenSSL) Accept: */* * HTTP 1.0, assume close after body < HTTP/1.0 200 OK < Accept-Ranges: bytes < Content-Length: 1318 < Content-Type: text/plain < Date: Fri, 21 Aug 2020 22:29:01 GMT < Last-Modified: Fri, 21 Aug 2020 22:06:54 GMT < Connection: close < Server: EC2ws < * Closing connection 0 [INF] curl.cpp:RequestPerform(2416): HTTP response code 200 [INF] curl.cpp:SetIAMCredentials(1870): IAM credential response = "{ "Code" : "Success", "LastUpdated" : "2020-08-21T22:06:05Z", "Type" : "AWS-HMAC", "AccessKeyId" : "ASIA2K4QCPJITSPKOMH7", "SecretAccessKey" : "QHn0pdTaLQ0tWuhvqZ1VeqZbGjADlA+itloakd2N", "Token" : "xxxxxxxxx", "Expiration" : "2020-08-22T04:22:25Z" }" [INF] curl.cpp:ReturnHandler(318): Pool full: destroy the oldest handler [INF] curl.cpp:CheckBucket(3413): check a bucket. [INF] curl.cpp:prepare_url(4703): URL is https://s3.amazonaws.com/test-bucket/test2/ [INF] curl.cpp:prepare_url(4736): URL changed is https://test-bucket.s3.amazonaws.com/test2/ [INF] curl.cpp:insertV4Headers(2753): computing signature [GET] [/test2/] [] [] [INF] curl.cpp:url_to_host(99): url is https://s3.amazonaws.com * Trying 52.95.128.36... * TCP_NODELAY set * Connected to test-bucket.s3.amazonaws.com (52.95.128.36) port 443 (#1) * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 * Server certificate: * subject: C=US; ST=Washington; L=Seattle; O=Amazon.com, Inc.; CN=*.s3.amazonaws.com * start date: Nov 9 00:00:00 2019 GMT * expire date: Mar 12 12:00:00 2021 GMT * subjectAltName: host "test-bucket.s3.amazonaws.com" matched cert's "*.s3.amazonaws.com" * issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert Baltimore CA-2 G2 * SSL certificate verify ok. > GET /test2/ HTTP/1.1 Host: test-bucket.s3.amazonaws.com User-Agent: s3fs/1.86 (commit hash unknown; OpenSSL) Accept: */* Authorization: AWS4-HMAC-SHA256 Credential=ASIA2K4QCPJITSPKOMH7/20200821/ap-southeast-2/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=30200a91553048c5b12509747027884e1ef5c40c7915929c7db8f01fd4983b12 x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 x-amz-date: 20200821T222901Z x-amz-security-token: xxxxxxxx < HTTP/1.1 404 Not Found < x-amz-request-id: 6AC7770903DE8A75 < x-amz-id-2: bVkZHH+LUGusPxVXzG2c8HUabfw0q9YpkazXW4JPc7hMMSCDGaSXdmzl6D9HwK/B+IZjAoj03h0= < Content-Type: application/xml < Transfer-Encoding: chunked < Date: Fri, 21 Aug 2020 22:29:01 GMT < Server: AmazonS3 < * Connection #1 to host test-bucket.s3.amazonaws.com left intact [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [ERR] curl.cpp:CheckBucket(3439): Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>test2/</Key><RequestId>6AC7770903DE8A75</RequestId><HostId>bVkZHH+LUGusPxVXzG2c8HUabfw0q9YpkazXW4JPc7hMMSCDGaSXdmzl6D9HwK/B+IZjAoj03h0=</HostId></Error> [CRT] s3fs.cpp:s3fs_check_service(3901): bucket not found(host=https://s3.amazonaws.com) - result of checking service. [ERR] s3fs.cpp:s3fs_exit_fuseloop(3483): Exiting FUSE event loop due to errors ``` [INF] s3fs.cpp:s3fs_destroy(3546): destroy [ec2-user@ip-172-31-72-248 ~]$ aws s3 ls s3://test-bucket PRE test1/ PRE test2/ PRE test3/ PRE test4/ PRE test5/
Author
Owner

@Asalle commented on GitHub (Jan 27, 2021):

it seems that I have the same issue with
s3fs V1.88 (commit:6d65e30)
pkg-config --modversion fuse 2.9.9
uname -r 5.4.0-60-generic

cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.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=focal
UBUNTU_CODENAME=focal

all this inside a docker container.
In my case, the folders that I created in the management console I can mount with no problems, but some of them I created programmatically with aws sdk's go client and I can't mount them

<!-- gh-comment-id:768363434 --> @Asalle commented on GitHub (Jan 27, 2021): it seems that I have the same issue with s3fs V1.88 (commit:6d65e30) pkg-config --modversion fuse 2.9.9 uname -r 5.4.0-60-generic cat /etc/os-release NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.1 LTS" VERSION_ID="20.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=focal UBUNTU_CODENAME=focal all this inside a docker container. In my case, the folders that I created in the management console I can mount with no problems, but some of them I created programmatically with aws sdk's go client and I can't mount them
Author
Owner

@Asalle commented on GitHub (Jan 27, 2021):

May be related to this https://github.com/s3fs-fuse/s3fs-fuse/wiki/FAQ#q-could-not-mount-with-specifying-the-path-under-bucket

<!-- gh-comment-id:768430357 --> @Asalle commented on GitHub (Jan 27, 2021): May be related to this https://github.com/s3fs-fuse/s3fs-fuse/wiki/FAQ#q-could-not-mount-with-specifying-the-path-under-bucket
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#738
No description provided.