[GH-ISSUE #473] Beijing region can't mount s3 service #263

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

Originally created by @rice5 on GitHub (Sep 21, 2016).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/473

I run the command:
s3fs royoleweb /demo -o passwd_file=/.passwd-s3fs -o url=https://s3.cn-north-1.amazonaws.com.cn -d -d -f -o curldbg

The result is:
[CRT] s3fs.cpp:set_s3fs_log_level(255): change debug level from [CRT] to [INF]
[INF] s3fs.cpp:set_moutpoint_attribute(4192): PROC(uid=500, gid=500) - MountPoint(uid=500, gid=500, mode=40775)
FUSE library version: 2.9.4
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.23
flags=0x0003f7fb
max_readahead=0x00020000
[CRT] s3fs.cpp:s3fs_init(3371): init v1.80(commit:9f174d7) with OpenSSL
[INF] s3fs.cpp:s3fs_check_service(3749): check services.
[INF] curl.cpp:CheckBucket(2860): check a bucket.
[INF] curl.cpp:prepare_url(4175): URL is https://s3.cn-north-1.amazonaws.com.cn/royoleweb/
[INF] curl.cpp:prepare_url(4207): URL changed is https://royoleweb.s3.cn-north-1.amazonaws.com.cn/
[INF] curl.cpp:insertV4Headers(2237): computing signature [GET] [/] [] []
[INF] curl.cpp:url_to_host(100): url is https://s3.cn-north-1.amazonaws.com.cn

  • Trying 54.222.20.18...
  • Connected to royoleweb.s3.cn-north-1.amazonaws.com.cn (54.222.20.18) port 443 (#0)
  • Initializing NSS with certpath: sql:/etc/pki/nssdb
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  • Server certificate:
  • subject: CN=*.s3.cn-north-1.amazonaws.com.cn,O="Amazon Connect Technology Services (Beijing) Co., Ltd.",L=Huairou District,ST=Beijing,C=CN
  • start date: Dec 08 12:05:08 2015 GMT
  • expire date: Feb 02 12:00:00 2017 GMT
  • common name: *.s3.cn-north-1.amazonaws.com.cn
  • issuer: CN=DigiCert Baltimore CA-2 G2,OU=www.digicert.com,O=DigiCert Inc,C=US

GET / HTTP/1.1
User-Agent: s3fs/1.80 (commit hash 9f174d7; OpenSSL)
Accept: /
Authorization: AWS4-HMAC-SHA256 Credential=AKIAOI66Y2YBC3I7L4GA/20160921/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=76201ff4eaf70a5a815c9a945d189911913b046283093fb2f2cb7055a4aefd33
host: royoleweb.s3.cn-north-1.amazonaws.com.cn
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date: 20160921T031825Z

< HTTP/1.1 400 Bad Request
< x-amz-bucket-region: cn-north-1
< x-amz-request-id: 7FFF076FD63EFB2C
< x-amz-id-2: lfbLVoZVS6NFRk55xYd6GKde7LYLvKopz5PSzowC2SLHl+BdVP3HED6YORmnxM1MS+9C0BuffLs=
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Wed, 21 Sep 2016 03:18:25 GMT
< Connection: close
< Server: AmazonS3
<

  • Closing connection 0
    [INF] curl.cpp:RequestPerform(1922): HTTP response code 400 was returned, returning EIO.
    [ERR] curl.cpp:CheckBucket(2899): Check bucket failed, S3 response:
    AuthorizationHeaderMalformedThe authorization header is malformed; the region 'us-east-1' is wrong; expecting 'cn-north-1'cn-north-17FFF076FD63EFB2ClfbLVoZVS6NFRk55xYd6GKde7LYLvKopz5PSzowC2SLHl+BdVP3HED6YORmnxM1MS+9C0BuffLs=
    [CRT] s3fs.cpp:s3fs_check_service(3770): Could not connect wrong region us-east-1, so retry to connect region cn-north-1.
    [INF] curl.cpp:CheckBucket(2860): check a bucket.
    [INF] curl.cpp:prepare_url(4175): URL is https://s3.cn-north-1.amazonaws.com.cn/royoleweb/
    [INF] curl.cpp:prepare_url(4207): URL changed is https://royoleweb.s3.cn-north-1.amazonaws.com.cn/
    [INF] curl.cpp:insertV4Headers(2237): computing signature [GET] [/] [] []
    [INF] curl.cpp:url_to_host(100): url is https://s3.cn-north-1.amazonaws.com.cn
  • Hostname royoleweb.s3.cn-north-1.amazonaws.com.cn was found in DNS cache
  • Trying 54.222.20.18...
  • Connected to royoleweb.s3.cn-north-1.amazonaws.com.cn (54.222.20.18) port 443 (#1)
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  • Server certificate:
  • subject: CN=*.s3.cn-north-1.amazonaws.com.cn,O="Amazon Connect Technology Services (Beijing) Co., Ltd.",L=Huairou District,ST=Beijing,C=CN
  • start date: Dec 08 12:05:08 2015 GMT
  • expire date: Feb 02 12:00:00 2017 GMT
  • common name: *.s3.cn-north-1.amazonaws.com.cn
  • issuer: CN=DigiCert Baltimore CA-2 G2,OU=www.digicert.com,O=DigiCert Inc,C=US

GET / HTTP/1.1
User-Agent: s3fs/1.80 (commit hash 9f174d7; OpenSSL)
Accept: /
Authorization: AWS4-HMAC-SHA256 Credential=AKIAOI66Y2YBC3I7L4GA/20160921/cn-north-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=50f4459f03ada279158612a3a8f36d7e08595cfacd790dee714a3e9a87f7fee8
host: royoleweb.s3.cn-north-1.amazonaws.com.cn
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date: 20160921T031825Z

< HTTP/1.1 403 Forbidden
< x-amz-bucket-region: cn-north-1
< x-amz-request-id: 094226AC15E253EA
< x-amz-id-2: wDB71AsBUppfqSfFXV0eDVWZaSRtHiZhdT0MZ82nj71gWfe2gjUW40ZaFVHnkOdzJK7Lskqziko=
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Wed, 21 Sep 2016 03:18:25 GMT
< Server: AmazonS3
<

  • Connection #1 to host royoleweb.s3.cn-north-1.amazonaws.com.cn left intact
    [INF] curl.cpp:RequestPerform(1927): HTTP response code 403 was returned, returning EPERM
    [ERR] curl.cpp:CheckBucket(2899): Check bucket failed, S3 response:
    InvalidAccessKeyIdThe AWS Access Key Id you provided does not exist in our records.AKIAOI66Y2YBC3I7L4GA094226AC15E253EAwDB71AsBUppfqSfFXV0eDVWZaSRtHiZhdT0MZ82nj71gWfe2gjUW40ZaFVHnkOdzJK7Lskqziko=
    [WAN] s3fs.cpp:s3fs_check_service(3790): Could not connect, so retry to connect by signature version 2.
    [INF] curl.cpp:CheckBucket(2860): check a bucket.
    [INF] curl.cpp:prepare_url(4175): URL is https://s3.cn-north-1.amazonaws.com.cn/royoleweb/
    [INF] curl.cpp:prepare_url(4207): URL changed is https://royoleweb.s3.cn-north-1.amazonaws.com.cn/
  • Found bundle for host royoleweb.s3.cn-north-1.amazonaws.com.cn: 0x7f92a01e6cc0
  • Re-using existing connection! (#1) with host royoleweb.s3.cn-north-1.amazonaws.com.cn
  • Connected to royoleweb.s3.cn-north-1.amazonaws.com.cn (54.222.20.18) port 443 (#1)

    GET / HTTP/1.1
    User-Agent: s3fs/1.80 (commit hash 9f174d7; OpenSSL)
    Host: royoleweb.s3.cn-north-1.amazonaws.com.cn
    Accept: /
    Authorization: AWS AKIAOI66Y2YBC3I7L4GA:QRMgUAVdlQnsarMCyD3c9yyqk90=
    Date: Wed, 21 Sep 2016 03:18:25 GMT

< HTTP/1.1 400 Bad Request
< x-amz-bucket-region: cn-north-1
< x-amz-request-id: 30F08E0C5C5215A0
< x-amz-id-2: 6pQAGazgK9Mtd0BgrypMV+kQj1H66uwZoGrZJyzkjTtgYmM8R8Fza/rqdbo66nhGxn3Y6vPsWuk=
< x-amz-region: cn-north-1
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Wed, 21 Sep 2016 03:18:25 GMT
< Connection: close
< Server: AmazonS3
<

  • Closing connection 1
    [INF] curl.cpp:RequestPerform(1922): HTTP response code 400 was returned, returning EIO.
    [ERR] curl.cpp:CheckBucket(2899): Check bucket failed, S3 response:
    InvalidRequestThe authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.30F08E0C5C5215A06pQAGazgK9Mtd0BgrypMV+kQj1H66uwZoGrZJyzkjTtgYmM8R8Fza/rqdbo66nhGxn3Y6vPsWuk=
    [CRT] s3fs.cpp:s3fs_check_service(3802): Bad Request - result of checking service.
    [ERR] s3fs.cpp:s3fs_exit_fuseloop(3361): Exiting FUSE event loop due to errors

    INIT: 7.19
    flags=0x00000011
    max_readahead=0x00020000
    max_write=0x00020000
    max_background=0
    congestion_threshold=0
    unique: 1, success, outsize: 40
    [INF] s3fs.cpp:s3fs_destroy(3436): destroy
    [WAN] s3fs.cpp:s3fs_destroy(3440): Could not release curl library.

Originally created by @rice5 on GitHub (Sep 21, 2016). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/473 I run the command: s3fs royoleweb ~/demo -o passwd_file=~/.passwd-s3fs -o url=https://s3.cn-north-1.amazonaws.com.cn -d -d -f -o curldbg The result is: [CRT] s3fs.cpp:set_s3fs_log_level(255): change debug level from [CRT] to [INF] [INF] s3fs.cpp:set_moutpoint_attribute(4192): PROC(uid=500, gid=500) - MountPoint(uid=500, gid=500, mode=40775) FUSE library version: 2.9.4 nullpath_ok: 0 nopath: 0 utime_omit_ok: 0 unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0 INIT: 7.23 flags=0x0003f7fb max_readahead=0x00020000 [CRT] s3fs.cpp:s3fs_init(3371): init v1.80(commit:9f174d7) with OpenSSL [INF] s3fs.cpp:s3fs_check_service(3749): check services. [INF] curl.cpp:CheckBucket(2860): check a bucket. [INF] curl.cpp:prepare_url(4175): URL is https://s3.cn-north-1.amazonaws.com.cn/royoleweb/ [INF] curl.cpp:prepare_url(4207): URL changed is https://royoleweb.s3.cn-north-1.amazonaws.com.cn/ [INF] curl.cpp:insertV4Headers(2237): computing signature [GET] [/] [] [] [INF] curl.cpp:url_to_host(100): url is https://s3.cn-north-1.amazonaws.com.cn - Trying 54.222.20.18... - Connected to royoleweb.s3.cn-north-1.amazonaws.com.cn (54.222.20.18) port 443 (#0) - Initializing NSS with certpath: sql:/etc/pki/nssdb - CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none - SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - Server certificate: - subject: CN=*.s3.cn-north-1.amazonaws.com.cn,O="Amazon Connect Technology Services (Beijing) Co., Ltd.",L=Huairou District,ST=Beijing,C=CN - start date: Dec 08 12:05:08 2015 GMT - expire date: Feb 02 12:00:00 2017 GMT - common name: *.s3.cn-north-1.amazonaws.com.cn - issuer: CN=DigiCert Baltimore CA-2 G2,OU=www.digicert.com,O=DigiCert Inc,C=US > GET / HTTP/1.1 User-Agent: s3fs/1.80 (commit hash 9f174d7; OpenSSL) Accept: _/_ Authorization: AWS4-HMAC-SHA256 Credential=AKIAOI66Y2YBC3I7L4GA/20160921/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=76201ff4eaf70a5a815c9a945d189911913b046283093fb2f2cb7055a4aefd33 host: royoleweb.s3.cn-north-1.amazonaws.com.cn x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 x-amz-date: 20160921T031825Z < HTTP/1.1 400 Bad Request < x-amz-bucket-region: cn-north-1 < x-amz-request-id: 7FFF076FD63EFB2C < x-amz-id-2: lfbLVoZVS6NFRk55xYd6GKde7LYLvKopz5PSzowC2SLHl+BdVP3HED6YORmnxM1MS+9C0BuffLs= < Content-Type: application/xml < Transfer-Encoding: chunked < Date: Wed, 21 Sep 2016 03:18:25 GMT < Connection: close < Server: AmazonS3 < - Closing connection 0 [INF] curl.cpp:RequestPerform(1922): HTTP response code 400 was returned, returning EIO. [ERR] curl.cpp:CheckBucket(2899): 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 'cn-north-1'</Message><Region>cn-north-1</Region><RequestId>7FFF076FD63EFB2C</RequestId><HostId>lfbLVoZVS6NFRk55xYd6GKde7LYLvKopz5PSzowC2SLHl+BdVP3HED6YORmnxM1MS+9C0BuffLs=</HostId></Error> [CRT] s3fs.cpp:s3fs_check_service(3770): Could not connect wrong region us-east-1, so retry to connect region cn-north-1. [INF] curl.cpp:CheckBucket(2860): check a bucket. [INF] curl.cpp:prepare_url(4175): URL is https://s3.cn-north-1.amazonaws.com.cn/royoleweb/ [INF] curl.cpp:prepare_url(4207): URL changed is https://royoleweb.s3.cn-north-1.amazonaws.com.cn/ [INF] curl.cpp:insertV4Headers(2237): computing signature [GET] [/] [] [] [INF] curl.cpp:url_to_host(100): url is https://s3.cn-north-1.amazonaws.com.cn - Hostname royoleweb.s3.cn-north-1.amazonaws.com.cn was found in DNS cache - Trying 54.222.20.18... - Connected to royoleweb.s3.cn-north-1.amazonaws.com.cn (54.222.20.18) port 443 (#1) - CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none - SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - Server certificate: - subject: CN=*.s3.cn-north-1.amazonaws.com.cn,O="Amazon Connect Technology Services (Beijing) Co., Ltd.",L=Huairou District,ST=Beijing,C=CN - start date: Dec 08 12:05:08 2015 GMT - expire date: Feb 02 12:00:00 2017 GMT - common name: *.s3.cn-north-1.amazonaws.com.cn - issuer: CN=DigiCert Baltimore CA-2 G2,OU=www.digicert.com,O=DigiCert Inc,C=US > GET / HTTP/1.1 User-Agent: s3fs/1.80 (commit hash 9f174d7; OpenSSL) Accept: _/_ Authorization: AWS4-HMAC-SHA256 Credential=AKIAOI66Y2YBC3I7L4GA/20160921/cn-north-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=50f4459f03ada279158612a3a8f36d7e08595cfacd790dee714a3e9a87f7fee8 host: royoleweb.s3.cn-north-1.amazonaws.com.cn x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 x-amz-date: 20160921T031825Z < HTTP/1.1 403 Forbidden < x-amz-bucket-region: cn-north-1 < x-amz-request-id: 094226AC15E253EA < x-amz-id-2: wDB71AsBUppfqSfFXV0eDVWZaSRtHiZhdT0MZ82nj71gWfe2gjUW40ZaFVHnkOdzJK7Lskqziko= < Content-Type: application/xml < Transfer-Encoding: chunked < Date: Wed, 21 Sep 2016 03:18:25 GMT < Server: AmazonS3 < - Connection #1 to host royoleweb.s3.cn-north-1.amazonaws.com.cn left intact [INF] curl.cpp:RequestPerform(1927): HTTP response code 403 was returned, returning EPERM [ERR] curl.cpp:CheckBucket(2899): Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>InvalidAccessKeyId</Code><Message>The AWS Access Key Id you provided does not exist in our records.</Message><AWSAccessKeyId>AKIAOI66Y2YBC3I7L4GA</AWSAccessKeyId><RequestId>094226AC15E253EA</RequestId><HostId>wDB71AsBUppfqSfFXV0eDVWZaSRtHiZhdT0MZ82nj71gWfe2gjUW40ZaFVHnkOdzJK7Lskqziko=</HostId></Error> [WAN] s3fs.cpp:s3fs_check_service(3790): Could not connect, so retry to connect by signature version 2. [INF] curl.cpp:CheckBucket(2860): check a bucket. [INF] curl.cpp:prepare_url(4175): URL is https://s3.cn-north-1.amazonaws.com.cn/royoleweb/ [INF] curl.cpp:prepare_url(4207): URL changed is https://royoleweb.s3.cn-north-1.amazonaws.com.cn/ - Found bundle for host royoleweb.s3.cn-north-1.amazonaws.com.cn: 0x7f92a01e6cc0 - Re-using existing connection! (#1) with host royoleweb.s3.cn-north-1.amazonaws.com.cn - Connected to royoleweb.s3.cn-north-1.amazonaws.com.cn (54.222.20.18) port 443 (#1) > GET / HTTP/1.1 User-Agent: s3fs/1.80 (commit hash 9f174d7; OpenSSL) Host: royoleweb.s3.cn-north-1.amazonaws.com.cn Accept: _/_ Authorization: AWS AKIAOI66Y2YBC3I7L4GA:QRMgUAVdlQnsarMCyD3c9yyqk90= Date: Wed, 21 Sep 2016 03:18:25 GMT < HTTP/1.1 400 Bad Request < x-amz-bucket-region: cn-north-1 < x-amz-request-id: 30F08E0C5C5215A0 < x-amz-id-2: 6pQAGazgK9Mtd0BgrypMV+kQj1H66uwZoGrZJyzkjTtgYmM8R8Fza/rqdbo66nhGxn3Y6vPsWuk= < x-amz-region: cn-north-1 < Content-Type: application/xml < Transfer-Encoding: chunked < Date: Wed, 21 Sep 2016 03:18:25 GMT < Connection: close < Server: AmazonS3 < - Closing connection 1 [INF] curl.cpp:RequestPerform(1922): HTTP response code 400 was returned, returning EIO. [ERR] curl.cpp:CheckBucket(2899): 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>30F08E0C5C5215A0</RequestId><HostId>6pQAGazgK9Mtd0BgrypMV+kQj1H66uwZoGrZJyzkjTtgYmM8R8Fza/rqdbo66nhGxn3Y6vPsWuk=</HostId></Error> [CRT] s3fs.cpp:s3fs_check_service(3802): Bad Request - result of checking service. [ERR] s3fs.cpp:s3fs_exit_fuseloop(3361): Exiting FUSE event loop due to errors INIT: 7.19 flags=0x00000011 max_readahead=0x00020000 max_write=0x00020000 max_background=0 congestion_threshold=0 unique: 1, success, outsize: 40 [INF] s3fs.cpp:s3fs_destroy(3436): destroy [WAN] s3fs.cpp:s3fs_destroy(3440): Could not release curl library.
kerem closed this issue 2026-03-04 01:43:50 +03:00
Author
Owner

@rangasoa commented on GitHub (May 4, 2017):

same issue here, any fix or workaround

<!-- gh-comment-id:299197657 --> @rangasoa commented on GitHub (May 4, 2017): same issue here, any fix or workaround
Author
Owner

@lyenliang commented on GitHub (Sep 11, 2018):

I got the same problem in Ningxia region.

<!-- gh-comment-id:420169936 --> @lyenliang commented on GitHub (Sep 11, 2018): I got the same problem in Ningxia region.
Author
Owner

@lyenliang commented on GitHub (Sep 21, 2018):

According to this tutorial, you need to add -o url=http://s3.cn-north-1.amazonaws.com.cn -o endpoint=cn-north-1 variables if you want to mount S3 in Beijing region.

For example, s3fs s3fs-mount-bucket /home/ec2-user/s3mnt -o passwd_file=/home/ec2-user/.passwd-s3fs -o url=http://s3.cn-north-1.amazonaws.com.cn -o endpoint=cn-north-1.

<!-- gh-comment-id:423379343 --> @lyenliang commented on GitHub (Sep 21, 2018): According to this [tutorial](https://aws.amazon.com/cn/blogs/china/s3fs-amazon-ec2-linux/), you need to add `-o url=http://s3.cn-north-1.amazonaws.com.cn -o endpoint=cn-north-1` variables if you want to mount S3 in Beijing region. For example, `s3fs s3fs-mount-bucket /home/ec2-user/s3mnt -o passwd_file=/home/ec2-user/.passwd-s3fs -o url=http://s3.cn-north-1.amazonaws.com.cn -o endpoint=cn-north-1`.
Author
Owner

@gaul commented on GitHub (Feb 2, 2019):

@rice5 did this suggestion work? If so please close this issue. Duplicate of #722.

<!-- gh-comment-id:459933570 --> @gaul commented on GitHub (Feb 2, 2019): @rice5 did this suggestion work? If so please close this issue. Duplicate of #722.
Author
Owner

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

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

<!-- gh-comment-id:505613238 --> @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#263
No description provided.