【问题标题】:Elasticsearch SignatureDoesNotMatch error when creating snapshot on GCS using s3使用 s3 在 GCS 上创建快照时出现 Elasticsearch SignatureDoesNotMatch 错误
【发布时间】:2017-02-24 02:25:39
【问题描述】:

我正在运行安装了 cloud-aws 插件的 elasticsearch 2.3.0。 我正在尝试使用 cloud-aws 插件在 Google Cloud Storage 上创建快照,因为我知道 Google 存储与 S3 兼容。

我遵循了这个文档 https://cloud.google.com/storage/docs/migrating#keys

对于所谓的“迁移”部分。

不幸的是,我收到了这个错误: Error Code: SignatureDoesNotMatch

这里是我要发送的其余电话:

curl -XPUT http://XXX:9200/_snapshot/google-test-repo -d '{
    "type": "s3",
    "settings": {
        "endpoint": "storage.googleapis.com",
        "bucket": "/my-bucket",
        "base_path": "mydirectory",
        "access_key": "my-google-dev-key",
        "secret_key": "my-google-secret-key"
    }
}'

这是响应:

   {
  "error": {
    "root_cause": [
      {
        "type": "repository_verification_exception",
        "reason": "[google-test-repo] path [mydirectory] is not accessible on master node"
      }
    ],
    "type": "repository_verification_exception",
    "reason": "[google-test-repo] path [mydirectory] is not accessible on master node",
    "caused_by": {
      "type": "i_o_exception",
      "reason": "Unable to upload object mydirectory/tests-C4S-4T6FS1CIMkvjebOMBw/master.dat-temp",
      "caused_by": {
        "type": "amazon_s3_exception",
        "reason": "The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method. (Service: Amazon S3; Status Code: 403; Error Code: SignatureDoesNotMatch; Request ID: null)"
      }
    }
  },
  "status": 500
}

谁能帮帮我?

【问题讨论】:

    标签: elasticsearch amazon-s3 google-cloud-storage elasticsearch-plugin


    【解决方案1】:

    通过提供适当的签名者类型

    解决了我的问题

    快照创建尝试执行 PUT 请求,因此失败并出现上述错误。在 elasticsearch.yml 配置文件中添加以下给定行后,错误应该会消失。请注意,yml文件发生任何变化后,需要重启elasticsearch服务。

    cloud.aws.s3.signer: S3SignerType
    

    参考:https://github.com/elastic/elasticsearch-cloud-aws/issues/223

    【讨论】:

      猜你喜欢
      • 2013-07-21
      • 1970-01-01
      • 2014-02-03
      • 2014-11-04
      • 2021-07-08
      • 2016-04-14
      • 1970-01-01
      • 2021-08-30
      • 1970-01-01
      相关资源
      最近更新 更多