# Azure snapshot error: Unable to find client with name \[abc\]

**URL:** https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231
**Category:** Elasticsearch
**Created:** [August 1, 2024, 11:07pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231 "2024-08-01T23:07:20Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![pjd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjd/32/136466_2.png) [@pjd](https://discuss.elastic.co/u/pjd)
#### Post date: [August 1, 2024, 11:07pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/1 "2024-08-01T23:07:20Z")

</div>

Running elasticsearch as a kubernetes pod. Here are the steps followed.

1. added keystore entries  
./bin/elasticsearch-keystore add azure.client.default.account  
./bin/elasticsearch-keystore add azure.client.default.key

2. Ran reload  
curl -X POST localhost:9200/\_nodes/reload\_secure\_settings

3. Fails to create repository with error  
`Failed creating repository for cluster: repositoryId: 2024-08-01-day, error: 500 Internal Server Error: "{"error":{"root_cause":[{"type":"settings_exception","reason":"Unable to find client with name [abc]"}],"type":"repository_verification_exception","reason":"[2024-08-01-day] path [][2024-08-01-day] is not accessible on master node","caused_by":{"type":"settings_exception","reason":"Unable to find client with name [abc]"}},"status":500}"]`

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [August 2, 2024, 2:46pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/2 "2024-08-02T14:46:31Z")

</div>

Welcome!

What is the command you ran to create the repository?

If you did something like:

```auto
PUT _snapshot/2024-08-01-day
{
  "type": "azure",
  "settings": {
    "client": "abc"
  }
}

```

Then this is wrong as the client id you defined is `default`.

Check [Azure repository | Elasticsearch Guide [8.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/repository-azure.html)

---

<div class="post-metadata">

### Author: ![pjd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjd/32/136466_2.png) [@pjd](https://discuss.elastic.co/u/pjd)
#### Post date: [August 2, 2024, 9:46pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/3 "2024-08-02T21:46:14Z")

</div>

I did not have the client set in the body. So I assumed it would take the "default"

could you please let me know what are the causes of this error ? thanks

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [August 2, 2024, 10:06pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/4 "2024-08-02T22:06:18Z")

</div>

Could you share the API call please?  
And what gives:

```
GET /_snapshot/_all

```

---

<div class="post-metadata">

### Author: ![pjd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjd/32/136466_2.png) [@pjd](https://discuss.elastic.co/u/pjd)
#### Post date: [August 4, 2024, 8:28pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/5 "2024-08-04T20:28:09Z")

</div>

Sure. Here is the output of \_/snapshot/\_all and sample create repository payload.

```auto
{
  "2024-08-02-day": {
    "type": "azure",
    "settings": {
      "container": "cluster",
      "base_path": "gold-0001/2024-08-02-day",
      "endpoint": "https://abc.blob.core.windows.net/",
      "account": "abc",
      "key": "somekey"
    }
  },
  "2024-08-03-day": {
    "type": "azure",
    "settings": {
      "container": "cluster",
      "base_path": "gold-0001/2024-08-03-day",
      "endpoint": "https://abc.blob.core.windows.net/",
      "account": "abc",
      "key": "somekey"
    }
  },
  "2024-08-04-day": {
    "type": "azure",
    "settings": {
      "container": "cluster",
      "base_path": "gold-0001/2024-08-04-day",
      "endpoint": "https://abc.blob.core.windows.net/",
      "account": "abc",
      "key": "somekey"
    }
  }
}

```

`{type=azure, settings={container=cluster, account=abc, key=somekey, base_path=gold-0001/2024-08-03-day}}`

And when I run list on elasticsearch-keystore on same node, I do see azure account and key.

```auto
bash-4.4$ ./elasticsearch-keystore list

azure.client.default.account

azure.client.default.key

keystore.seed

```

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [August 4, 2024, 9:21pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/6 "2024-08-04T21:21:54Z")

</div>

From #Elastic Search to #Elasticsearch

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [August 5, 2024, 8:39am UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/7 "2024-08-05T08:39:36Z")

</div>

What is the request you are sending to the cluster which creates this error message?

---

<div class="post-metadata">

### Author: ![pjd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjd/32/136466_2.png) [@pjd](https://discuss.elastic.co/u/pjd)
#### Post date: [August 5, 2024, 2:39pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/8 "2024-08-05T14:39:28Z")

</div>

Looks like it runs into this error when creating snaposhot. Here is the stacktrace.

```auto
[2024-08-05T14:30:00,741][WARN][r.suppressed] [elasticsearch-gold-0001-data-0] path: /_snapshot/2024-08-05-day/20240805143000, params: {repository=2024-08-05-day, snapshot=20240805143000}
org.elasticsearch.transport.RemoteTransportException: [elasticsearch-gold-0001-master-0][10.42.0.18:9310][cluster:admin/snapshot/create]
Caused by: org.elasticsearch.repositories.RepositoryException: [2024-08-05-day] Could not determine repository generation from root blobs
	at org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1895) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:777) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) ~[elasticsearch-7.17.16.jar:7.17.16]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.io.IOException: Unable to list blobs by prefix [index-] for path gold-0001/2024-08-05-day/
	at org.elasticsearch.repositories.azure.AzureBlobStore.listBlobsByPrefix(AzureBlobStore.java:340) ~[?:?]
	at org.elasticsearch.repositories.azure.AzureBlobContainer.listBlobsByPrefix(AzureBlobContainer.java:135) ~[?:?]
	at org.elasticsearch.repositories.blobstore.BlobStoreRepository.listBlobsToGetLatestIndexId(BlobStoreRepository.java:2597) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:2569) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1892) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:777) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) ~[elasticsearch-7.17.16.jar:7.17.16]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
	at java.lang.Thread.run(Thread.java:829) ~[?:?]
Caused by: org.elasticsearch.common.settings.SettingsException: Unable to find client with name [abc]
	at org.elasticsearch.repositories.azure.AzureStorageService.getClientSettings(AzureStorageService.java:101) ~[?:?]
	at org.elasticsearch.repositories.azure.AzureStorageService.client(AzureStorageService.java:91) ~[?:?]
	at org.elasticsearch.repositories.azure.AzureBlobStore.getAzureBlobServiceClientClient(AzureBlobStore.java:624) ~[?:?]
	at org.elasticsearch.repositories.azure.AzureBlobStore.client(AzureBlobStore.java:616) ~[?:?]
	at org.elasticsearch.repositories.azure.AzureBlobStore.listBlobsByPrefix(AzureBlobStore.java:321) ~[?:?]
	at org.elasticsearch.repositories.azure.AzureBlobContainer.listBlobsByPrefix(AzureBlobContainer.java:135) ~[?:?]
	at org.elasticsearch.repositories.blobstore.BlobStoreRepository.listBlobsToGetLatestIndexId(BlobStoreRepository.java:2597) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:2569) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1892) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:777) ~[elasticsearch-7.17.16.jar:7.17.16]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) ~[elasticsearch-7.17.16.jar:7.17.16]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
	at java.lang.Thread.run(Thread.java:829) ~[?:?]

```

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [August 5, 2024, 5:20pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/9 "2024-08-05T17:20:29Z")

</div>

So. My advices:

- upgrade to latest 7.17
- Add an abc client using the same credentials you used for default

You have something probably wrong in your cluster but this should help.

---

<div class="post-metadata">

### Author: ![pjd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjd/32/136466_2.png) [@pjd](https://discuss.elastic.co/u/pjd)
#### Post date: [August 8, 2024, 3:08pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/10 "2024-08-08T15:08:30Z")

</div>

Thank you for the suggestions.

We removed account, key and endpoint from create repository payload and that seem to have fixed the issue. I am not sure if these were added to make it work with older version of elasticsearch.

Another follow-up question for elastic 7.17. It looks like we need to add azure account name and key in elastic keystore in every node using the add commands. Is there a way to do this from helm charts in kubernetes so that the manual step of adding in keystore can be avoided ? Adding manually in every node when there are huge numbers of nodes would be difficult.

Thanks

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [August 8, 2024, 7:45pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/11 "2024-08-08T19:45:27Z")

</div>

I have no idea. But I'd open a new discussion for this.

---

<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: [September 5, 2024, 7:45pm UTC](https://discuss.elastic.co/t/azure-snapshot-error-unable-to-find-client-with-name-abc/364231/12 "2024-09-05T19:45:50Z")

</div>

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