elasticsearch config_error ai_generated true

RepositoryVerificationException: [my_repo] 验证失败:无法写入路径 [s3://bucket/backup] 的仓库

RepositoryVerificationException: [my_repo] verification failed: could not write to repository at path [s3://bucket/backup]

ID: elasticsearch/repository-verification-failed-write

其他格式: JSON · Markdown 中文 · English
88%修复率
86%置信度
1证据数
2024-05-20首次发现

版本兼容性

版本状态引入弃用备注
7.17.0 active
8.10.0 active
8.14.0 active

根因分析

由于权限或连接问题,Elasticsearch 无法写入配置的快照仓库路径。

English

Elasticsearch cannot write to the configured snapshot repository path due to permissions or connectivity issues.

generic

官方文档

https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-restore.html

解决方案

  1. 验证 S3 存储桶权限,确保 IAM 角色具有 `s3:PutObject` 访问权限:`aws s3api put-bucket-policy --bucket backup --policy file://policy.json`。
  2. 使用 `curl -XPUT 'localhost:9200/_snapshot/my_repo' -H 'Content-Type: application/json' -d '{"type": "s3", "settings": {"bucket": "backup", "region": "us-east-1"}}'` 手动测试仓库路径并检查错误。
  3. 将仓库路径更新为可写位置,例如,将 `s3://bucket/backup` 改为 `s3://bucket/backups/`,并确保路径存在。

无效尝试

常见但无效的做法:

  1. 90% 失败

    The underlying write issue remains unchanged.

  2. 85% 失败

    A timeout increase does not fix permission or connectivity errors.

  3. 75% 失败

    The new repository may have similar issues if the path is incorrect.