【问题标题】:Unable to mount S3 on EC2 using RIOFS - HTTP error: 400 (Bad Request)无法使用 RIOFS 在 EC2 上挂载 S3 - HTTP 错误:400(错误请求)
【发布时间】:2020-11-23 15:24:59
【问题描述】:

我正在尝试使用 RIOFS 在 AWS EC2 实例上安装 S3 存储桶。我失败了。

这是日志

12:47:53 [main] (main main.c:753) Using config file: /home/ubuntu/.config/riofs/riofs.conf.xml
12:47:53 [con] (http_connection_init http_connection.c:79) [con: 0x561ff22c2be0] Connecting to s3.amazonaws.com:80
12:47:53 [con] (http_connection_make_request http_connection.c:814) [con: 0x561ff22c2be0] GET /csv-test/?acl  bucket: csv-test, host: s3.amazonaws.com, out_len: 0
12:47:53 [con] (http_connection_on_response_cb http_connection.c:464) [con: 0x561ff22c2be0] Got HTTP response from server! (160msec)
12:47:53 [con] (http_connection_on_response_cb http_connection.c:544) [con: 0x561ff22c2be0] New URL: csv-test.s3.amazonaws.com
12:47:53 [con] (http_connection_init http_connection.c:79) [con: 0x561ff22c2be0] Connecting to csv-test.s3.amazonaws.com:80
12:47:53 [con] (http_connection_on_close http_connection.c:196) [con: 0x561ff22c2be0] Connection closed !
12:47:53 [con] (http_connection_make_request http_connection.c:814) [con: 0x561ff22c2be0] GET /?acl  bucket: csv-test, host: csv-test.s3.amazonaws.com, out_len: 0
12:47:53 [con] (http_connection_on_close http_connection.c:196) [con: 0x561ff22c2be0] Connection closed !
12:47:53 [con] (http_connection_on_response_cb http_connection.c:464) [con: 0x561ff22c2be0] Got HTTP response from server! (9msec)
12:47:53 [con] (http_connection_on_response_cb http_connection.c:591) [con: 0x561ff22c2be0] Server returned HTTP error: 400 (Bad Request). AWS message: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.
12:47:53 [con]  (http_connection_on_response_cb http_connection.c:602) [con: 0x561ff22c2be0] Server returned HTTP error: 400 (Bad Request)! Retry ID: 1 of 20

有没有办法在 RIOFS 连接中启用AWS4-HMAC-SHA256。我正在法兰克福 eu-central-1 和伦敦 eu-west-2 尝试这个,但在这两个地区都没有成功。

我也尝试使用 s3fs 并以无法访问存储桶错误结束,但无法获得像 riofs 这样指出实际错误的详细日志。

【问题讨论】:

  • 你能用标志-f -d再次运行s3fs吗?
  • @Andrew 我现在已经解决了这个问题。相同的选项适用于在 us-east-1 上创建的存储桶
  • 较新的 AWS 区域仅支持 AWS 签名 v4。较新版本的 s3fs 应该支持并且确实默认为 v4。你能分享一下你使用的 s3fs 版本吗?

标签: amazon-web-services amazon-s3 fuse s3fs


【解决方案1】:

AWS4-HMAC-SHA256 是签名版本 4,只有少数地区支持它。我对法兰克福 eu-central-1 和伦敦 eu-west-2 进行了测试。这两个区域都不起作用。它仅适用于 US-EAST-1 N. Virginia 地区。

我可以成功地将在 us-east-1 上创建的 S3 存储桶挂载到 EC2 上。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-18
    • 1970-01-01
    • 1970-01-01
    • 2014-12-11
    • 2012-02-09
    相关资源
    最近更新 更多