如何解决无法使用OCI Amazon S3兼容性API配置Elasticsearch快照存储库
我的Elasticsearch7.8.0在OCI OKE中运行(Kubernetes在Oracle Cloud中运行)。我想使用OCI Amazon S3兼容性API使用OCI对象存储设置Elasticsearch备份快照。添加了repository-s3插件,并在POD中配置了ACCESS_KEY和SECRET_KEY。在存储库中,我收到“ s_s_l_peer_unverified_exception”
PUT /_snapshot/s3-repository
{
"type": "s3","settings": {
"client": "default","region": "OCI_REGION","endpoint": "OCI_TENANCY.compat.objectstorage.OCI_REGION.oraclecloud.com","bucket": "es-backup"
}
}
重新放置:
{
"error" : {
"root_cause" : [
{
"type" : "repository_verification_exception","reason" : "[s3-repository] path is not accessible on master node"
}
],"type" : "repository_verification_exception","reason" : "[s3-repository] path is not accessible on master node","caused_by" : {
"type" : "i_o_exception","reason" : "Unable to upload object [tests-0J3NChNRT9WIQJknHAssKg/master.dat] using a single upload","caused_by" : {
"type" : "sdk_client_exception","reason" : "Unable to execute HTTP request: Certificate for <es-backup.OCI_TENANCY.compat.objectstorage.OCI_REGION.oraclecloud.com> doesn't match any of the subject alternative names: [swiftobjectstorage.us-ashburn-1.oraclecloud.com]","caused_by" : {
"type" : "s_s_l_peer_unverified_exception","reason" : "Certificate for <es-backup.OCI_TENANCY.compat.objectstorage.OCI_REGION.oraclecloud.com> doesn't match any of the subject alternative names: [swiftobjectstorage.us-ashburn-1.oraclecloud.com]"
}
}
}
},"status" : 500
}
解决方法
希望您知道何时使用S3兼容API。
“端点”:“ OCI_TENANCY.compat.objectstorage.OCI_REGION.oraclecloud.com”
请将OCI_TENANCY修改为TENANCY_NAMESPACE。有关更多信息,请参阅conditional (ternary) operator ?:
。
您可以在管理->租户详细信息页面中找到租户名称空间信息。
,那么,您不应该与es-backup.OCI_TENANCY.compat.objectstorage.OCI_REGION.oraclecloud.com进行对话,您的存储桶名称是域的一部分。您可以在浏览器中尝试使用它,并且会收到有关证书的类似安全警告。
如果您查看https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm#usingAPI,将会看到以下内容:
应用程序必须使用基于路径的访问。不支持虚拟主机样式访问(以bucketname.namespace.compat.objectstorage.region.oraclecloud.com访问存储桶)。
AWS正在从S3(https://aws.amazon.com/blogs/aws/amazon-s3-path-deprecation-plan-the-rest-of-the-story/)的基于路径的URL迁移到基于子域的URL,因此ES S3插件可能默认使用新的AWS方式进行处理。
如果将https:// URL用作终结点值,是否有所不同?看我的6.8配置,我有类似的东西:
{
"s3-repository": {
"type": "s3","settings": {
"bucket": "es-backup","client": "default","endpoint": "https://{namespace}.compat.objectstorage.us-ashburn-1.oraclecloud.com/","region": "us-ashburn-1"
}
}
}
我猜测的是,拥有端点的完整URL可能会设置协议和 path_style_access 或6.8并不需要您设置 path_style_access 设为 true ,但可能为7.8。无论哪种方式,请尝试使用完整的URL或将 path_style_access 设置为 true 。 https://www.elastic.co/guide/en/elasticsearch/plugins/master/repository-s3-client.html
上的相关文档版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。