title: Elasticsearch snapshot to Azure blob storage - Can not find an azure client for account
body: <p>I want to update the Azure storage account that we upload snapshots to but I get the below error:
  &quot;Can not find an azure client for account [null]]&quot; 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 may be helpful.</p>
  <p>NOTE: Same error as <a href="https://discuss.elastic.co/t/error-while-creating-elasticsearch-azure-repository-for-snapshot-and-restore/61248" rel="nofollow noreferrer">this</a> 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.</p>
  <p><strong>Environment</strong>
  OS: Centos7
  Elasticsearch Version: 2.4.6
  Plugin: cloud-azure-2.4.6.zip
  (<a href="https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/cloud-azure/2.4.6/cloud-azure-2.4.6.zip" rel="nofollow noreferrer">https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/cloud-azure/2.4.6/cloud-azure-2.4.6.zip</a>)</p>
  <p><strong>/etc/Elasticsearch/Elasticsearch.yml</strong></p>
  <pre><code>...
  discovery.zen.ping.unicast.hosts: ['&lt;IP1&gt;', '&lt;IP2&gt;', '&lt;IP3&gt;', '&lt;IP4&gt;', '&lt;IP5&gt;']
  cloud.azure.storage.opening.account: &quot;STORAGE_ACCOUNT_NAME&quot;
  cloud.azure.storage.opening.key: &quot;SECRET_KEY&quot;
  ...
  </code></pre>
  <p><strong>create_snapshot.sh</strong></p>
  <pre><code>$ curl -X PUT &quot;&lt;IP&gt;:9200/_snapshot/${repo}/${backup}?wait_for_completion=true&amp;pretty&quot;
  {
    &quot;error&quot; : {
      &quot;root_cause&quot; : [ {
        &quot;type&quot; : &quot;repository_exception&quot;,
        &quot;reason&quot; : &quot;[elasticsearch-snapshots] Can not find an azure client for account [null]&quot;
      } ],
      &quot;type&quot; : &quot;repository_exception&quot;,
      &quot;reason&quot; : &quot;[elasticsearch-snapshots] Can not find an azure client for account [null]&quot;,
      &quot;caused_by&quot; : {
        &quot;type&quot; : &quot;illegal_argument_exception&quot;,
        &quot;reason&quot; : &quot;Can not find an azure client for account [null]&quot;
      }
    },
    &quot;status&quot; : 500
  }
  </code></pre>
  <p><strong>Full Log</strong></p>
  <pre><code>[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][&lt;ip&gt;: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
  </code></pre>