当我试图通过在我的弹性搜索docker容器中执行以下命令来对我的s3(本地部署的minio(进行快照时:
curl -X PUT "localhost:9200/_snapshot/s3_repository/snapshot_1?wait_for_completion=true&pretty"
我得到了以下信息:
{
"error" : {
"root_cause" : [
{
"type" : "repository_exception",
"reason" : "[s3_repository] Could not determine repository generation from root blobs"
}
],
"type" : "repository_exception",
"reason" : "[s3_repository] Could not determine repository generation from root blobs",
"caused_by" : {
"type" : "i_o_exception",
"reason" : "Exception when listing blobs by prefix [index-]",
"caused_by" : {
"type" : "sdk_client_exception",
"reason" : "Unable to execute HTTP request: my-first-bucket.s3",
"caused_by" : {
"type" : "unknown_host_exception",
"reason" : "my-first-bucket.s3"
}
}
}
},
"status" : 500
}
请帮忙吗?
注意,我使用以下内容创建了s3_repository:
curl -XPUT 'http://localhost:9200/_snapshot/s3_repository?verify=false&pretty' -H 'Content-Type: application/json' -d'
{
"type": "s3",
"settings": {
"bucket": "my-first-bucket",
"endpoint": "http://s3:9000"
}
}'
注意,http://s3:9000
中的s3
是我的docker-compose.yml
中的服务minio的名称
提前谢谢!
这里的问题很可能是在MinIO启动时没有创建bucket。MinIO至少不正式支持环境变量MINIO_DEFAULT_BUCKETS
。MinIO启动后,您可以尝试确认bucket是否按预期存在。
由于bucket只需要创建一次,因此可以在MinIO启动后通过脚本进行创建。
请知道您可以在找到我们https://slack.min.io/365年7月24日。如果您有商业问题,请联系我们hello@min.io或在我们的Ask an Expert Chat功能上https://min.io/pricing?action=talk-对我们来说。