Hi Elasticsearch,
I want to update the Azure storage account that we upload snapshots to but I get the below error:
"Can not find an azure client for account [null]]" this is only happening when I change the storage account. This new storage account is in a different region and subscription. Please let me know if there's any other details that you may need.
NOTE: Same error as this topic but I saw that it was closed. I have double checked my credentials and storage account name and I believe them to be correct:
OS: Centos7
Elasticsearch Version: 2.4.6
Plugin: cloud-azure-2.4.6.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
}
Full Log
[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