Kuzzle S3 插件 / Minio 无法连接

问题描述

我有以下 Kuzzle S3 插件配置:

"s3": {
  // AWS S3 bucket
  "bucketName": "chris",// this is a bucket i created in Minio
  "endpoint": "http://10.0.0.66:9000","s3ClientOptions": {
    "s3ForcePathStyle": false
  },"signedUrlTTL": 1200000,"redisPrefix": "s3Plugin/uploads"
},

我不知道这个配置是否正确。当我使用测试文件kuzzleio/kuzzle-plugin-s3/blob/master/test/s3-upload-test.html

我收到以下错误

Uncaught (in promise) KuzzleError: Caught an unexpected plugin error: Inaccessible host: `chris.10.0.0.66'. This service may not be available in the `us-east-1' region. This is probably not a Kuzzle error,but a problem with a plugin implementation.

'chris.10.0.0.66' 是一个不正确的资源 - 正如你所看到的,我没有在配置中引用它。

enter image description here

10.0.0.66 只能在我的网络中访问。

有人可以帮忙吗?非常感谢。

解决方法

好的 - 所以我找到了一个有效的答案

"s3": {
  // AWS S3 bucket
  "bucketName": "chris","endpoint": "http://10.0.0.66:9000","s3ClientOptions": {
    "s3ForcePathStyle": true,"signatureVersion": "v4"
  },"signedUrlTTL": 1200000,"redisPrefix": "s3Plugin/uploads"
},

我修改了 s3ClientOptions: “s3ClientOptions”:{ "s3ForcePathStyle": true,// Minio 必须为 true "signatureVersion": "v4" // 添加了这一行 }

来源 = https://docs.min.io/docs/how-to-use-aws-sdk-for-javascript-with-minio-server.html