📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 7.4-7.17

简而言之,当 Elasticsearch 尝试清理 S3 仓库但未提供访问密钥(access_key)时,就会出现此错误。访问密钥是与 S3 服务进行身份验证所必需的凭据。

要解决此问题,您可以在 elasticsearch.yml 配置文件中提供访问密钥,或者在调用清理 API 时将其作为参数传递。此外,请确保提供的访问密钥具有在 S3 仓库上执行清理操作的必要权限。

日志上下文 #

日志 “access_key option is required for cleaning up S3 repository” 的类名是 CleanupS3RepositoryCommand.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些需要深入了解上下文的用户参考:

    throw new ElasticsearchException("you must not specify both region and endpoint");
}
String accessKey = accessKeyOption.value(options);
if (Strings.isNullOrEmpty(accessKey)) {
    throw new ElasticsearchException("access_key option is required for cleaning up S3 repository");
}
String secretKey = secretKeyOption.value(options);
if (Strings.isNullOrEmpty(secretKey)) {
    throw new ElasticsearchException("secret_key option is required for cleaning up S3 repository");