# "Unable to connect to Elasticsearch. Error: \[resource\_already\_exists\_exception\]" after upgrade ELK

**URL:** <https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-error-resource-already-exists-exception-after-upgrade-elk/249998>\
**Category:** Kibana\
**Created:** [September 25, 2020, 3:34pm UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-error-resource-already-exists-exception-after-upgrade-elk/249998 "2020-09-25T15:34:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bognad](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@bognad](https://discuss.elastic.co/u/bognad)\
**Post date:** [September 25, 2020, 3:34pm UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-error-resource-already-exists-exception-after-upgrade-elk/249998/1 "2020-09-25T15:34:51Z")

</div>

Hi! I am upgrade ELK from 7.2 to 7.9.1.  
Kibana is unable to connect to ES

After upgrade kibana had two indexes:

```auto
curl https://localhost:9200/_cat/indices/*?v&s=index

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open .kibana_1 70vM6TvWRD-gkYwsH_pfsQ 1 0 0 0 208b 208b
green open .kibana_2 ej6zN6GgQJSFKOQDglj-xg 1 0 2424 96 2.1mb 2.1mb
green open .kibana_task_manager_1 BMD5VAJ6SFy-IeBJwLzoAA 1 0 0 0 208b 208b
green open .kibana_task_manager_2 w7yLj54JRd6-8_bzNyX70g 1 0 2 0 31.9kb 31.9kb

```

i have tried, and restarting:

```auto
curl -XDELETE http://localhost:9200/.kibana*

```

But same error happens over and over.

result:

```auto
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open .kibana_1 bFi-5a5RTwqGWklNRxO2DA 1 0                                                  
yellow open .kibana_task_manager_1 MQ0Gr6pHT12TRFyb-JYxfQ 1 0                                                  

```

Logs:

```auto
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:16:21Z","tags":["info","savedobjects-service"],"pid":8,"message":"Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations..."}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:16:21Z","tags":["info","savedobjects-service"],"pid":8,"message":"Starting saved objects migrations"}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:16:21Z","tags":["info","savedobjects-service"],"pid":8,"message":"Creating index .kibana_task_manager_1."}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:16:21Z","tags":["info","savedobjects-service"],"pid":8,"message":"Creating index .kibana_1."}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:16:51Z","tags":["warning","savedobjects-service"],"pid":8,"message":"Unable to connect to Elasticsearch. Error: Request Timeout after 30000ms"}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:16:53Z","tags":["warning","savedobjects-service"],"pid":8,"message":"Unable to connect to Elasticsearch. Error: [resource_already_exists_exception] index [.kibana_task_manager_1/MQ0Gr6pHT12TRFyb-JYxfQ] already exists, with { index_uuid=\"MQ0Gr6pHT12TRFyb-JYxfQ\" & index=\".kibana_task_manager_1\" }"}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:16:53Z","tags":["warning","savedobjects-service"],"pid":8,"message":"Another Kibana instance appears to be migrating the index. Waiting for that migration to complete. If no other Kibana instance is attempting migrations, you can get past this message by deleting index .kibana_task_manager_1 and restarting Kibana."}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:16:53Z","tags":["warning","savedobjects-service"],"pid":8,"message":"Unable to connect to Elasticsearch. Error: [resource_already_exists_exception] index [.kibana_1/bFi-5a5RTwqGWklNRxO2DA] already exists, with { index_uuid=\"bFi-5a5RTwqGWklNRxO2DA\" & index=\".kibana_1\" }"}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:16:53Z","tags":["warning","savedobjects-service"],"pid":8,"message":"Another Kibana instance appears to be migrating the index. Waiting for that migration to complete. If no other Kibana instance is attempting migrations, you can get past this message by deleting index .kibana_1 and restarting Kibana."}

```

---

<div class="post-metadata">

**Author:** ![bognad](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@bognad](https://discuss.elastic.co/u/bognad)\
**Post date:** [September 25, 2020, 3:39pm UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-error-resource-already-exists-exception-after-upgrade-elk/249998/2 "2020-09-25T15:39:38Z")

</div>

I have changed elasticsearch.requestTimeout in config file kibana.yml

elasticsearch.requestTimeout: 70000

It works:

```auto
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:32:32Z","tags":["info","savedobjects-service"],"pid":9,"message":"Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations..."}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:32:32Z","tags":["info","savedobjects-service"],"pid":9,"message":"Starting saved objects migrations"}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:32:32Z","tags":["info","savedobjects-service"],"pid":9,"message":"Creating index .kibana_task_manager_1."}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:32:32Z","tags":["info","savedobjects-service"],"pid":9,"message":"Creating index .kibana_1."}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:33:02Z","tags":["info","savedobjects-service"],"pid":9,"message":"Pointing alias .kibana_task_manager to .kibana_task_manager_1."}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:33:02Z","tags":["info","savedobjects-service"],"pid":9,"message":"Pointing alias .kibana to .kibana_1."}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:33:23Z","tags":["info","savedobjects-service"],"pid":9,"message":"Finished in 51281ms."}
kibana_1 | {"type":"log","@timestamp":"2020-09-25T17:33:23Z","tags":["info","savedobjects-service"],"pid":9,"message":"Finished in 51389ms."}

```

---

<div class="post-metadata">

**Author:** ![Dzmitry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dzmitry/32/65026_2.png) [@Dzmitry](https://discuss.elastic.co/u/Dzmitry)\
**Post date:** [September 25, 2020, 4:01pm UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-error-resource-already-exists-exception-after-upgrade-elk/249998/3 "2020-09-25T16:01:40Z")

</div>

Hi @bognad

I'm glad to hear that you found a way to fix it. Usually default timeout of 30000 is good enough, but it depends on where you are hosting your ES and Kibana instances.

You can double check the upgrade flow in the [official documentation](https://www.elastic.co/guide/en/elastic-stack/7.9/upgrading-elastic-stack.html)

Regards, Dzmitry

---

<div class="post-metadata">

**Author:** ![bognad](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@bognad](https://discuss.elastic.co/u/bognad)\
**Post date:** [September 28, 2020, 8:50am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-error-resource-already-exists-exception-after-upgrade-elk/249998/4 "2020-09-28T08:50:18Z")

</div>

Tnx Dzmitry!  
I am glad to see Elastic Team Member in my topic))  
In next time boot kibana finished at 28000ms.  
Maybe, increasing the timeout is only necessary  
for migration.

---

<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:** [October 26, 2020, 8:50am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-error-resource-already-exists-exception-after-upgrade-elk/249998/5 "2020-10-26T08:50:19Z")

</div>

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