# Elastisearch snapshots error - Can not find an azure client for account

**URL:** <https://discuss.elastic.co/t/elastisearch-snapshots-error-can-not-find-an-azure-client-for-account/288754>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [November 9, 2021, 11:57am UTC](https://discuss.elastic.co/t/elastisearch-snapshots-error-can-not-find-an-azure-client-for-account/288754 "2021-11-09T11:57:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cian/32/96904_2.png) [@Cian](https://discuss.elastic.co/u/Cian)\
**Post date:** [November 9, 2021, 11:57am UTC](https://discuss.elastic.co/t/elastisearch-snapshots-error-can-not-find-an-azure-client-for-account/288754/1 "2021-11-09T11:57:57Z")

</div>

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:

> [@Error while creating elasticsearch Azure repository for snapshot and restore](https://discuss.elastic.co/t/error-while-creating-elasticsearch-azure-repository-for-snapshot-and-restore/61248):
>
> Hi All, I want to take snapshot and restore using azure repository in Linux, I have configured these below setting in yml, cloud: azure: storage: my\_account: account: https://devesrepo.blob.core.windows.net/ key: KEY with the above setting, service is started, but i m getting below error when creating repository in Elasticsearch 2.4.0, PUT \_snapshot/my\_backup { "type": "azure" } Error msg:- { "error": { "root\_cause": [ …

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](https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/cloud-azure/2.4.6/cloud-azure-2.4.6.zip))

\*\*/etc/elasticsearch/elasticsearch.yml

```auto
...
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**

```auto
$ 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**

```auto
[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

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 7, 2021, 11:58am UTC](https://discuss.elastic.co/t/elastisearch-snapshots-error-can-not-find-an-azure-client-for-account/288754/2 "2021-12-07T11:58:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
