# Elasticsearch cluster status is yellow

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow/342911>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security, docker, ilm-index-lifecycle-management\
**Created:** [September 13, 2023, 7:26am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow/342911 "2023-09-13T07:26:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikascateina](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikascateina/32/123762_2.png) [@vikascateina](https://discuss.elastic.co/u/vikascateina)\
**Post date:** [September 13, 2023, 7:26am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow/342911/1 "2023-09-13T07:26:16Z")

</div>

Hi, I have created elasticsearch,kibana and apm in a single node and all is working properly ,kibana and apm is healthy but elasticsearch status is yellow.I also want to say elasticsearch status was green before,but after adding cluster.name: "docker-cluster"  
network.host: 0.0.0.0  
xpack.security.enabled: true  
xpack.security.authc.api\_key.enabled: true in elasticsearch.yml file it is in yellow.  
if I am running curl -u username:password -XGET '[http://localhost:9200/\_cat/shards?v](http://localhost:9200/_cat/shards?v)' I am getting apm-7.17.9-onboarding-2023.09.13,apm-7.17.9-error-000001,apm-7.17.9-metric-000001,apm-7.17.9-profile-000001,apm-7.17.9-transaction-000001as duplicate and in that one is started and other duplicate one is UNASSIGNED. I have deleted unassigned shards but next day If I am restarting the elasticsearch I am getting apm-7.17.9-onboarding-2023.09.13 as duplicate I want to make elasticsearch healthy.How to do it?

---

<div class="post-metadata">

**Author:** ![HiteshSingh](https://avatars.discourse-cdn.com/v4/letter/h/f475e1/32.png) [@HiteshSingh](https://discuss.elastic.co/u/HiteshSingh)\
**Post date:** [September 13, 2023, 10:13am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow/342911/2 "2023-09-13T10:13:52Z")

</div>

@vikascateina

First of all, please share your complete yml files.

Also, since you have configured cluster name that means you must be working with cluster mode. Have you configured master and data node? If yes, then please share both the yml files.

I would suggest you to clear your `path.data` content from your disk system and then try to perform fresh setup in a cluster mode.

---

<div class="post-metadata">

**Author:** ![vikascateina](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikascateina/32/123762_2.png) [@vikascateina](https://discuss.elastic.co/u/vikascateina)\
**Post date:** [September 13, 2023, 10:19am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow/342911/3 "2023-09-13T10:19:08Z")

</div>

Hi, cluster.name: "docker-cluster" is by default and I am using single node for elasticsearch in ecs in aws.

---

<div class="post-metadata">

**Author:** ![HiteshSingh](https://avatars.discourse-cdn.com/v4/letter/h/f475e1/32.png) [@HiteshSingh](https://discuss.elastic.co/u/HiteshSingh)\
**Post date:** [September 13, 2023, 10:24am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow/342911/4 "2023-09-13T10:24:22Z")

</div>

If you are just running elastic on single node then delete the data content and delete any indices you have and then restart it again

Run:

```auto
curl -X DELETE "localhost:9200/<index_name>?pretty"

```

---

<div class="post-metadata">

**Author:** ![vikascateina](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikascateina/32/123762_2.png) [@vikascateina](https://discuss.elastic.co/u/vikascateina)\
**Post date:** [September 13, 2023, 10:44am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow/342911/5 "2023-09-13T10:44:20Z")

</div>

I have done that but as I mentioned earlier I have deleted that specific index eg.apm-7.17.9-onboarding-2023.09.12 but if today I restart the elasticsearch that index is created again with apm-7.17.9-onboarding-2023.09.13 and again I have to delete it then it becomes green but I want to be persistent.Then how we can do it?

---

<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 11, 2023, 10:44am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow/342911/6 "2023-10-11T10:44:32Z")

</div>

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