Elasticsearch快照到Azure blob存储-找不到帐户的Azure客户端



我想更新我们上传快照的Azure存储帐户,但我收到以下错误:"找不到帐户[null]]的azure客户端";只有当我更改存储帐户时才会发生这种情况。此新存储帐户位于不同的区域和订阅中。如果还有其他可能有用的细节,请告诉我。

注意:与此主题相同的错误,但我看到它已关闭。我已经仔细检查了我的凭据和存储帐户名,我相信它们是正确的。

环境操作系统:Centos7Elasticsearch版本:2.4.6插件:cloud-azure-2.46.zip(https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/cloud-azure/2.4.6/cloud-azure-2.4.6.zip)

/etc/Elasticsearch/Elasticsearch.yml

...
discovery.zen.ping.unicast.hosts: ['<IP1>', '<IP2>', '<IP3>', '<IP4>', '<IP5>']
cloud.azure.storage.opening.account: "STORAGE_ACCOUNT_NAME"
cloud.azure.storage.opening.key: "SECRET_KEY"
...

create_snapshot.sh

$ curl -X PUT "<IP>:9200/_snapshot/${repo}/${backup}?wait_for_completion=true&pretty"
{
"error" : {
"root_cause" : [ {
"type" : "repository_exception",
"reason" : "[elasticsearch-snapshots] Can not find an azure client for account [null]"
} ],
"type" : "repository_exception",
"reason" : "[elasticsearch-snapshots] Can not find an azure client for account [null]",
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "Can not find an azure client for account [null]"
}
},
"status" : 500
}

完整日志

[2021-11-09 11:18:40,215][WARN ][rest.suppressed          ] path: /_snapshot/jibeio/production_2021-11-09-11-17, params: {pretty=, repository=jibeio, wait_for_completion=true, snapshot=productio
n_2021-11-09-11-17}
RemoteTransportException[[Bentley Wittman][<ip>:9300][cluster:admin/snapshot/create]]; nested: RepositoryException[[elasticsearch-snapshots] Can not find an azure client for account [nul
l]]; nested: IllegalArgumentException[Can not find an azure client for account [null]];
Caused by: RepositoryException[[elasticsearch-snapshots] Can not find an azure client for account [null]]; nested: IllegalArgumentException[Can not find an azure client for account [null]];
at org.elasticsearch.cloud.azure.storage.AzureStorageServiceImpl.createContainer(AzureStorageServiceImpl.java:168)
at org.elasticsearch.cloud.azure.blobstore.AzureBlobStore.createContainer(AzureBlobStore.java:117)
at org.elasticsearch.repositories.azure.AzureRepository.initializeSnapshot(AzureRepository.java:164)
at org.elasticsearch.snapshots.SnapshotsService.beginSnapshot(SnapshotsService.java:305)
at org.elasticsearch.snapshots.SnapshotsService.access$600(SnapshotsService.java:91)
at org.elasticsearch.snapshots.SnapshotsService$1$1.run(SnapshotsService.java:227)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Can not find an azure client for account [null]
at org.elasticsearch.cloud.azure.storage.AzureStorageServiceImpl.getSelectedClient(AzureStorageServiceImpl.java:112)
at org.elasticsearch.cloud.azure.storage.AzureStorageServiceImpl.createContainer(AzureStorageServiceImpl.java:162)
... 8 more

请检查引用是否可以缩小问题范围。

  • 根据跟踪的错误,似乎缺少存储快照的容器或客户端帐户名(忽略,因为您已经确认是正确的(一定是可能的原因。

  • 通过将cloud.azure.storage.default.container参数添加到elasticsearch.yml配置文件中,并使用要存储快照的容器的名称,或者通过传递HTTP请求上的容器选项。

  • 或者,如果不是这样,请检查您是否提供了正确配置的帐户名>("{{存储帐户名}}.bob.core.windows.net"(,并指向群集中具有帐户名的所有节点的密钥。

  • 尝试使用不同于key1或key2 的密钥

  • 另请检查〔此存储库azure使用情况〕

  • 如果所有配置都正确,请检查是否有防火墙或代理阻止访问。

正确跟踪异常。在logging.yml文件中发送以下请求

PUT /_cluster/settings
{
"transient" : {
"logger.cloud.azure.storage" : "TRACE"
}
}

如果问题仍然存在,您可以转到概览页面>提出支持请求;支持+故障排除>新的支持请求。

参考:使用azure云插件将弹性搜索索引归档到azure blob存储

最新更新