我正在运行带有安装的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
}

谁能帮我吗?

最佳答案

通过提供适当的签名者类型解决了我的问题

快照创建尝试执行PUT请求,因此失败,并出现上述错误。将以下给定的行添加到elasticsearch.yml配置文件后,该错误应消失。请注意,在yml文件中进行任何更改后,您都需要重新启动elasticsearch服务。

cloud.aws.s3.signer: S3SignerType

引用:https://github.com/elastic/elasticsearch-cloud-aws/issues/223

07-24 09:38
查看更多