[GH-ISSUE #1336] Bucket url is not resolving with both IAM role and Access Keys #717

Closed
opened 2026-03-04 01:48:10 +03:00 by kerem · 3 comments
Owner

Originally created by @StayOvr on GitHub (Jul 20, 2020).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1336

Hi there,
I followed the link https://cloudacademy.com/blog/s3-ftp-server/ and this github repo to setup FTP server on EC2 and mount the s3 bucket.

FTP seems working fine, but mounting the s3 bucket step is failing. Initially we tried with IAM role which has permissions on the S3 bucket, but it says couldn't resolve the host. Now i am trying with access key/secret key( i created an iam role and got the keys) - still same issue. Can you please check and suggest what could be the issue ?

[ec2-user@ip-xx-xx-xx-xx ~]$ sudo /usr/local/bin/s3fs s3uploads \

-o use_cache=/tmp,iam_role="teslanav",allow_other /home/s3ftpadmin/ftp/files
-o dbglevel=info -f
-o passwd_file=/etc/passwd-s3fs
-o curldbg
-o url="https://s3-us-east-1.amazonaws.com"
-o nonempty
[CRT] s3fs.cpp:set_s3fs_log_level(298): change debug level from [CRT] to [INF]
[INF] s3fs.cpp:set_mountpoint_attribute(4412): PROC(uid=0, gid=0) - MountPoint(uid=1001, gid=1001, mode=40755)
[INF] curl.cpp:InitMimeType(723): Loaded mime information from /etc/mime.types
s3fs: specifying both passwd_file and the access keys options is invalid.
[ec2-user@ip-172-31-53-40 ~]$ sudo /usr/local/bin/s3fs s3uploads
-o use_cache=/tmp,allow_other /home/s3ftpadmin/ftp/files
-o dbglevel=info -f
-o passwd_file=/etc/passwd-s3fs
-o curldbg
-o url="https://s3-us-east-1.amazonaws.com"
-o nonempty
[CRT] s3fs.cpp:set_s3fs_log_level(298): change debug level from [CRT] to [INF]
[INF] s3fs.cpp:set_mountpoint_attribute(4412): PROC(uid=0, gid=0) - MountPoint(uid=1001, gid=1001, mode=40755)
[INF] curl.cpp:InitMimeType(723): Loaded mime information from /etc/mime.types
[INF] s3fs.cpp:s3fs_init(3504): init v1.86(commit:e0a38ad) with OpenSSL
[INF] s3fs.cpp:s3fs_check_service(3839): check services.
[INF] curl.cpp:CheckBucket(3527): check a bucket.
[INF] curl.cpp:prepare_url(4831): URL is https://s3-us-east-1.amazonaws.com/s3uploads/
[INF] curl.cpp:prepare_url(4864): URL changed is https://s3uploads.s3-us-east-1.amazonaws.com/
[INF] curl.cpp:insertV4Headers(2863): computing signature [GET] [/] [] []
[INF] curl.cpp:url_to_host(99): url is https://s3-us-east-1.amazonaws.com
[CURL DBG] * Could not resolve host: s3uploads.s3-us-east-1.amazonaws.com
[CURL DBG] * Closing connection 0
[ERR] curl.cpp:RequestPerform(2586): ### CURLE_COULDNT_RESOLVE_HOST
[INF] curl.cpp:RequestPerform(2687): ### retrying...
[INF] curl.cpp:RemakeHandle(2313): Retry request. [type=5][url=https://s3uploads.s3-us-east-1.amazonaws.com/][path=/]
[CURL DBG] * Could not resolve host: s3uploads.s3-us-east-1.amazonaws.com
[CURL DBG] * Closing connection 1
[ERR] curl.cpp:RequestPerform(2586): ### CURLE_COULDNT_RESOLVE_HOST
[INF] curl.cpp:RequestPerform(2687): ### retrying...
[INF] curl.cpp:RemakeHandle(2313): Retry request. [type=5][url=https://s3uploads.s3-us-east-1.amazonaws.com/][path=/]
[CURL DBG] * Could not resolve host: s3uploads.s3-us-east-1.amazonaws.com
[CURL DBG] * Closing connection 2
[ERR] curl.cpp:RequestPerform(2586): ### CURLE_COULDNT_RESOLVE_HOST
[INF] curl.cpp:RequestPerform(2687): ### retrying...
[INF] curl.cpp:RemakeHandle(2313): Retry request. [type=5][url=https://s3uploads.s3-us-east-1.amazonaws.com/][path=/]
[CURL DBG] * Could not resolve host: s3uploads.s3-us-east-1.amazonaws.com
[CURL DBG] * Closing connection 3
[ERR] curl.cpp:RequestPerform(2586): ### CURLE_COULDNT_RESOLVE_HOST
[INF] curl.cpp:RequestPerform(2687): ### retrying...
[INF] curl.cpp:RemakeHandle(2313): Retry request. [type=5][url=https://s3uploads.s3-us-east-1.amazonaws.com/][path=/]
[CURL DBG] * Could not resolve host: s3uploads.s3-us-east-1.amazonaws.com
[CURL DBG] * Closing connection 4
[ERR] curl.cpp:RequestPerform(2586): ### CURLE_COULDNT_RESOLVE_HOST
[INF] curl.cpp:RequestPerform(2687): ### retrying...
[INF] curl.cpp:RemakeHandle(2313): Retry request. [type=5][url=https://s3uploads.s3-us-east-1.amazonaws.com/][path=/]
[ERR] curl.cpp:RequestPerform(2705): ### giving up
[ERR] curl.cpp:CheckBucket(3553): Check bucket failed, S3 response:
[CRT] s3fs.cpp:s3fs_check_service(3916): unable to connect(host=https://s3-us-east-1.amazonaws.com) - result of checking service.
[INF] curl.cpp:ReturnHandler(341): Pool full: destroy the oldest handler
[ERR] s3fs.cpp:s3fs_exit_fuseloop(3494): Exiting FUSE event loop due to errors

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

Originally created by @StayOvr on GitHub (Jul 20, 2020). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1336 Hi there, I followed the link https://cloudacademy.com/blog/s3-ftp-server/ and this github repo to setup FTP server on EC2 and mount the s3 bucket. FTP seems working fine, but mounting the s3 bucket step is failing. Initially we tried with IAM role which has permissions on the S3 bucket, but it says couldn't resolve the host. Now i am trying with access key/secret key( i created an iam role and got the keys) - still same issue. Can you please check and suggest what could be the issue ? [ec2-user@ip-xx-xx-xx-xx ~]$ sudo /usr/local/bin/s3fs s3uploads \ > -o use_cache=/tmp,iam_role="teslanav",allow_other /home/s3ftpadmin/ftp/files \ > -o dbglevel=info -f \ > -o passwd_file=/etc/passwd-s3fs \ > -o curldbg \ > -o url="https://s3-us-east-1.amazonaws.com" \ > -o nonempty [CRT] s3fs.cpp:set_s3fs_log_level(298): change debug level from [CRT] to [INF] [INF] s3fs.cpp:set_mountpoint_attribute(4412): PROC(uid=0, gid=0) - MountPoint(uid=1001, gid=1001, mode=40755) [INF] curl.cpp:InitMimeType(723): Loaded mime information from /etc/mime.types s3fs: specifying both passwd_file and the access keys options is invalid. [ec2-user@ip-172-31-53-40 ~]$ sudo /usr/local/bin/s3fs s3uploads \ > -o use_cache=/tmp,allow_other /home/s3ftpadmin/ftp/files \ > -o dbglevel=info -f \ > -o passwd_file=/etc/passwd-s3fs \ > -o curldbg \ > -o url="https://s3-us-east-1.amazonaws.com" \ > -o nonempty [CRT] s3fs.cpp:set_s3fs_log_level(298): change debug level from [CRT] to [INF] [INF] s3fs.cpp:set_mountpoint_attribute(4412): PROC(uid=0, gid=0) - MountPoint(uid=1001, gid=1001, mode=40755) [INF] curl.cpp:InitMimeType(723): Loaded mime information from /etc/mime.types [INF] s3fs.cpp:s3fs_init(3504): init v1.86(commit:e0a38ad) with OpenSSL [INF] s3fs.cpp:s3fs_check_service(3839): check services. [INF] curl.cpp:CheckBucket(3527): check a bucket. [INF] curl.cpp:prepare_url(4831): URL is https://s3-us-east-1.amazonaws.com/s3uploads/ [INF] curl.cpp:prepare_url(4864): URL changed is https://s3uploads.s3-us-east-1.amazonaws.com/ [INF] curl.cpp:insertV4Headers(2863): computing signature [GET] [/] [] [] [INF] curl.cpp:url_to_host(99): url is https://s3-us-east-1.amazonaws.com [CURL DBG] * Could not resolve host: s3uploads.s3-us-east-1.amazonaws.com [CURL DBG] * Closing connection 0 [ERR] curl.cpp:RequestPerform(2586): ### CURLE_COULDNT_RESOLVE_HOST [INF] curl.cpp:RequestPerform(2687): ### retrying... [INF] curl.cpp:RemakeHandle(2313): Retry request. [type=5][url=https://s3uploads.s3-us-east-1.amazonaws.com/][path=/] [CURL DBG] * Could not resolve host: s3uploads.s3-us-east-1.amazonaws.com [CURL DBG] * Closing connection 1 [ERR] curl.cpp:RequestPerform(2586): ### CURLE_COULDNT_RESOLVE_HOST [INF] curl.cpp:RequestPerform(2687): ### retrying... [INF] curl.cpp:RemakeHandle(2313): Retry request. [type=5][url=https://s3uploads.s3-us-east-1.amazonaws.com/][path=/] [CURL DBG] * Could not resolve host: s3uploads.s3-us-east-1.amazonaws.com [CURL DBG] * Closing connection 2 [ERR] curl.cpp:RequestPerform(2586): ### CURLE_COULDNT_RESOLVE_HOST [INF] curl.cpp:RequestPerform(2687): ### retrying... [INF] curl.cpp:RemakeHandle(2313): Retry request. [type=5][url=https://s3uploads.s3-us-east-1.amazonaws.com/][path=/] [CURL DBG] * Could not resolve host: s3uploads.s3-us-east-1.amazonaws.com [CURL DBG] * Closing connection 3 [ERR] curl.cpp:RequestPerform(2586): ### CURLE_COULDNT_RESOLVE_HOST [INF] curl.cpp:RequestPerform(2687): ### retrying... [INF] curl.cpp:RemakeHandle(2313): Retry request. [type=5][url=https://s3uploads.s3-us-east-1.amazonaws.com/][path=/] [CURL DBG] * Could not resolve host: s3uploads.s3-us-east-1.amazonaws.com [CURL DBG] * Closing connection 4 [ERR] curl.cpp:RequestPerform(2586): ### CURLE_COULDNT_RESOLVE_HOST [INF] curl.cpp:RequestPerform(2687): ### retrying... [INF] curl.cpp:RemakeHandle(2313): Retry request. [type=5][url=https://s3uploads.s3-us-east-1.amazonaws.com/][path=/] [ERR] curl.cpp:RequestPerform(2705): ### giving up [ERR] curl.cpp:CheckBucket(3553): Check bucket failed, S3 response: [CRT] s3fs.cpp:s3fs_check_service(3916): unable to connect(host=https://s3-us-east-1.amazonaws.com) - result of checking service. [INF] curl.cpp:ReturnHandler(341): Pool full: destroy the oldest handler [ERR] s3fs.cpp:s3fs_exit_fuseloop(3494): Exiting FUSE event loop due to errors [INF] s3fs.cpp:s3fs_destroy(3557): destroy
kerem closed this issue 2026-03-04 01:48:10 +03:00
Author
Owner

@sqlbot commented on GitHub (Jul 20, 2020):

-o url="https://s3-us-east-1.amazonaws.com" isn't correct. The tutorial also appears to be partially incorrect.

Some Amazon S3 regions support s3-${region}.amazonaws.com for legacy reasons, but us-east-1 does not. The canonical form is s3.${region}.amazonaws.com -- a dot, not a dash, after s3.

You should find that -o url="https://s3.us-east-1.amazonaws.com" works as expected, or gives a different error if you have other issues to resolve also.

https://docs.aws.amazon.com/general/latest/gr/s3.html

<!-- gh-comment-id:661078991 --> @sqlbot commented on GitHub (Jul 20, 2020): `-o url="https://s3-us-east-1.amazonaws.com"` isn't correct. The tutorial also appears to be partially incorrect. Some Amazon S3 regions support `s3-${region}.amazonaws.com` for legacy reasons, but us-east-1 does not. The canonical form is `s3.${region}.amazonaws.com` -- a dot, not a dash, after `s3`. You should find that `-o url="https://s3.us-east-1.amazonaws.com"` works as expected, or gives a different error if you have other issues to resolve also. https://docs.aws.amazon.com/general/latest/gr/s3.html
Author
Owner

@StayOvr commented on GitHub (Jul 20, 2020):

Thanks for catching the issue, i corrected the region part and able mount and upload the objects.

<!-- gh-comment-id:661177021 --> @StayOvr commented on GitHub (Jul 20, 2020): Thanks for catching the issue, i corrected the region part and able mount and upload the objects.
Author
Owner

@gaul commented on GitHub (Oct 10, 2020):

Please reopen if symptoms persist. Thanks for your help @sqlbot!

<!-- gh-comment-id:706525366 --> @gaul commented on GitHub (Oct 10, 2020): Please reopen if symptoms persist. Thanks for your help @sqlbot!
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#717
No description provided.