[GH-ISSUE #216] CURLE_COULDNT_RESOLVE_HOST error when using url option #118

Closed
opened 2026-03-04 01:42:17 +03:00 by kerem · 2 comments
Owner

Originally created by @ogg1e on GitHub (Jul 31, 2015).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/216

I have nginx set up as a reverse proxy. I'm able to use s3cmd to connect through the reverse proxy as well as via chrome browser. So I know it works.

If I try to use the url startup option:
./s3fs mybucket /tmp/bucket -o url=http://localhost:8080 -f

I always get :

./s3fs mybucket ./bucket/ -o url=http://localhost:8080 -f
    set_moutpoint_attribute(4052): PROC(uid=501, gid=20) - MountPoint(uid=501, gid=20, mode=40755)
s3fs_init(3236): init
s3fs_check_service(3595): check services.
    CheckBucket(2537): check a bucket.
    insertV4Headers(1973): computing signature [GET] [/] [] []
    url_to_host(99): url is http://localhost:8080
RequestPerform(1692): ### CURLE_COULDNT_RESOLVE_HOST
    RequestPerform(1790): ### retrying...
    RemakeHandle(1453): Retry request. [type=5][url=http://mybucket.localhost:8080/][path=/]
RequestPerform(1692): ### CURLE_COULDNT_RESOLVE_HOST
    RequestPerform(1790): ### retrying...
    RemakeHandle(1453): Retry request. [type=5][url=http://mybucket.localhost:8080/][path=/]
RequestPerform(1692): ### CURLE_COULDNT_RESOLVE_HOST
    RequestPerform(1790): ### retrying...
    RemakeHandle(1453): Retry request. [type=5][url=http://mybucket.localhost:8080/][path=/]
RequestPerform(1797): ### giving up
CheckBucket(2575): Check bucket failed, S3 response: 

If I don't use the reverse proxy and leave out the url option, it connects to aws no problem. So why does it not like the url option?

I have:

127.0.0.1 localhost

in my /etc/hosts file.

Originally created by @ogg1e on GitHub (Jul 31, 2015). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/216 I have nginx set up as a reverse proxy. I'm able to use s3cmd to connect through the reverse proxy as well as via chrome browser. So I know it works. If I try to use the url startup option: ./s3fs mybucket /tmp/bucket -o url=http://localhost:8080 -f I always get : ``` code ./s3fs mybucket ./bucket/ -o url=http://localhost:8080 -f set_moutpoint_attribute(4052): PROC(uid=501, gid=20) - MountPoint(uid=501, gid=20, mode=40755) s3fs_init(3236): init s3fs_check_service(3595): check services. CheckBucket(2537): check a bucket. insertV4Headers(1973): computing signature [GET] [/] [] [] url_to_host(99): url is http://localhost:8080 RequestPerform(1692): ### CURLE_COULDNT_RESOLVE_HOST RequestPerform(1790): ### retrying... RemakeHandle(1453): Retry request. [type=5][url=http://mybucket.localhost:8080/][path=/] RequestPerform(1692): ### CURLE_COULDNT_RESOLVE_HOST RequestPerform(1790): ### retrying... RemakeHandle(1453): Retry request. [type=5][url=http://mybucket.localhost:8080/][path=/] RequestPerform(1692): ### CURLE_COULDNT_RESOLVE_HOST RequestPerform(1790): ### retrying... RemakeHandle(1453): Retry request. [type=5][url=http://mybucket.localhost:8080/][path=/] RequestPerform(1797): ### giving up CheckBucket(2575): Check bucket failed, S3 response: ``` If I don't use the reverse proxy and leave out the url option, it connects to aws no problem. So why does it not like the url option? I have: 127.0.0.1 localhost in my /etc/hosts file.
kerem closed this issue 2026-03-04 01:42:17 +03:00
Author
Owner

@kahing commented on GitHub (Jul 31, 2015):

s3fs by default uses hostname based bucket request, which is why it tried to resolve mybucket.localhost and failed. Either put that in your /etc/hosts or use the use_path_request_style option to change to path based requests.

<!-- gh-comment-id:126773481 --> @kahing commented on GitHub (Jul 31, 2015): s3fs by default uses hostname based bucket request, which is why it tried to resolve mybucket.localhost and failed. Either put that in your /etc/hosts or use the use_path_request_style option to change to path based requests.
Author
Owner

@ogg1e commented on GitHub (Jul 31, 2015):

Ahh. I missed that. Thanks!

<!-- gh-comment-id:126776647 --> @ogg1e commented on GitHub (Jul 31, 2015): Ahh. I missed that. Thanks!
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#118
No description provided.