# Elasticsearch snapshot backups in azure repository unknown host exception

**URL:** <https://discuss.elastic.co/t/elasticsearch-snapshot-backups-in-azure-repository-unknown-host-exception/224436>\
**Category:** Elasticsearch\
**Created:** [March 20, 2020, 2:50pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-backups-in-azure-repository-unknown-host-exception/224436 "2020-03-20T14:50:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yanislav\_Shetrev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yanislav_shetrev/32/54691_2.png) [@Yanislav\_Shetrev](https://discuss.elastic.co/u/Yanislav_Shetrev)\
**Post date:** [March 20, 2020, 2:50pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-backups-in-azure-repository-unknown-host-exception/224436/1 "2020-03-20T14:50:30Z")

</div>

Trying to create backup repository for snapshots in Elasticsearch 6.5.2. But I am getting Internal server error(500) when executing the curl below. The error message is `{"type":"unknown_host_exception","reason":"{{storage-account-name}}.blob.core.windows.net"}` I checked multiple times and this storage account exists in azure, as well as the container and the key matches. The storage account lives inside a different resource group than the resource group of the elasticsearch cluster. However, I do not think this is the issue.

```auto
 curl -X PUT http://{{address}}/_snapshot/{{repo-name}} \
        -H 'Content-Type: application/json;charset=UTF-8' -v \
        -d '{
        "type": "azure",
            "settings": {
                "container": "{{container-name}}",
                "chunk_size": "32m",
                "compress": true
            }
        }'

```

My elasticsearch.yml has the following configuration:

```auto
cloud.azure.storage.timeout: 10s
azure.client.default.max_retries: 7
azure.client.default.endpoint_suffix: {{azure-cloud}}

cloud:
    azure:
        storage:
            {{container-name}}:
                account: {{storage-account-name}}
                key:{{storage-account-key}}

```

---

<div class="post-metadata">

**Author:** ![Armin\_Braun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/armin_braun/32/20092_2.png) [@Armin\_Braun](https://discuss.elastic.co/u/Armin_Braun)\
**Post date:** [March 21, 2020, 2:07pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-backups-in-azure-repository-unknown-host-exception/224436/2 "2020-03-21T14:07:31Z")

</div>

Hi @Yanislav_Shetrev

> [@Yanislav\_Shetrev](#):
>
> `{"type":"unknown_host_exception","reason":"{{storage-account-name}}.blob.core.windows.net"}`

I'm assuming you added the `{{storage-account-name}}` placeholder here? Could you try just pinging the actual host of the blob store from an ES cluster node to verify that this isn't a system issue?

---

<div class="post-metadata">

**Author:** ![Yanislav\_Shetrev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yanislav_shetrev/32/54691_2.png) [@Yanislav\_Shetrev](https://discuss.elastic.co/u/Yanislav_Shetrev)\
**Post date:** [March 23, 2020, 4:29pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-backups-in-azure-repository-unknown-host-exception/224436/3 "2020-03-23T16:29:53Z")

</div>

HI @Armin_Braun,

I am actually using the China Cloud as endpoint suffix:  
`azure.client.default.endpoint_suffix: core.chinacloudapi.cn `  
Trying to `ping {account-name}.blob.core.chinacloudapi.cn` timeouts. Which, based on your point, is maybe a system issue.

I am also using Elasticsearch 6.5.2, which I believe does not support backups and restore because when I looked into the logs I saw the error message:

`Caused by: java.lang.IllegalArgumentException: missing required setting [azure.client.default.account] for setting [azure.client.default.endpoint_suffix]`  
And when I tried to add this account name and key to the elasticsearch keystore, it could not find the command : `bin/elasticsearch-keystore add {{account-name}}` there was no binary named like that in the bin directory.

I am planning to upgrade to 7.5.1 and give it a try again.

---

<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:** [April 20, 2020, 4:30pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-backups-in-azure-repository-unknown-host-exception/224436/4 "2020-04-20T16:30:03Z")

</div>

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