# Elasticsearch "status" : "yellow" How to fix the status?

**URL:** <https://discuss.elastic.co/t/elasticsearch-status-yellow-how-to-fix-the-status/316467>\
**Category:** Elasticsearch\
**Created:** [October 12, 2022, 7:15pm UTC](https://discuss.elastic.co/t/elasticsearch-status-yellow-how-to-fix-the-status/316467 "2022-10-12T19:15:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![igor\_denisov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_denisov/32/84450_2.png) [@igor\_denisov](https://discuss.elastic.co/u/igor_denisov)\
**Post date:** [October 12, 2022, 7:15pm UTC](https://discuss.elastic.co/t/elasticsearch-status-yellow-how-to-fix-the-status/316467/1 "2022-10-12T19:15:37Z")

</div>

```auto
#curl kibana:kibana@172.17.0.1:9200/_cluster/health?pretty=true

```

```auto
{
  "cluster_name" : "xxxxx-cluster",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 2,
  "number_of_data_nodes" : 2,
  "active_primary_shards" : 185,
 "active_shards" : 185,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 185,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 50.0

```

```auto
#curl -sS -XGET kibana:kibana@172.17.0.1:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason | grep UNASSIGNED

```

```auto
cdr-a-2020-02-xxxxxxxx 0 r UNASSIGNED CLUSTER_RECOVERED
cdr-b-2022-07-xxxxxxxx 0 r UNASSIGNED CLUSTER_RECOVERED
accounts-2021-12-172.16.23.201 0 r UNASSIGNED CLUSTER_RECOVERED
cdr-a-2019-11-xxxxxxxx 0 r UNASSIGNED CLUSTER_RECOVERED
cdr-a-2019-11- 0 r UNASSIGNED CLUSTER_RECOVERED
accounts-2020-10-xxxxxxxx 0 r UNASSIGNED CLUSTER_RECOVERED
cdr-a-2019-12- 0 r UNASSIGNED CLUSTER_RECOVERED
cdr-a-2022-04- 0 r UNASSIGNED CLUSTER_RECOVERED
cdr-b-2021-05-xxxxxxxx 0 r UNASSIGNED CLUSTER_RECOVERED

```

```auto
#curl -sS -XGET kibana:kibana@172.17.0.1:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason | awk '/UNASSIGNED/ { print $1 }'

```

```auto
cdr-a-2021-03-
cdr-b-2021-03-xxxxxxx
cdr-a-2020-07-
accounts-2022-07-172.16.23.201
cdr-a-2021-07-xxxxxxxx
cdr-a-2021-12-xxxxxxxx
cdr-b-2020-12-xxxxxxxx 

```

---

<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:** [October 12, 2022, 7:29pm UTC](https://discuss.elastic.co/t/elasticsearch-status-yellow-how-to-fix-the-status/316467/2 "2022-10-12T19:29:28Z")

</div>

Welcome!

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

Please run the [recovery API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html) and paste the report here:

```auto
GET /_cat/recovery?v

```

---

<div class="post-metadata">

**Author:** ![igor\_denisov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_denisov/32/84450_2.png) [@igor\_denisov](https://discuss.elastic.co/u/igor_denisov)\
**Post date:** [October 12, 2022, 9:08pm UTC](https://discuss.elastic.co/t/elasticsearch-status-yellow-how-to-fix-the-status/316467/3 "2022-10-12T21:08:23Z")

</div>

```auto
index shard time type stage source_host source_node target_host target_node repository snapshot files files_recovered files_percent files_total bytes bytes_recovered bytes_percent bytes_total translog_ops translog_ops_recovered translog_ops_percent
cdr-a-2021-08- 0 2.2s existing_store done n/a n/a 172.19.0.3 elasticsearch2 n/a n/a 0 0 100.0% 38 0 0 100.0% 14835897 0 0 100.0%
cdr-b-2019-12-xxxxxxx 0 4.5s existing_store done n/a n/a 172.19.0.2 elasticsearch n/a n/a 0 0 100.0% 57 0 0 100.0% 46647225 0 0 100.0%
...............

```

```auto
curl kibana:kibana@172.19.0.3:9200/_cat/health
1665609578 21:19:38 xxxxx-cluster yellow 2 2 185 185 0 0 185 0 - 50.0%

```

```auto
curl kibana:kibana@172.17.0.1:9200/_cat/health
1665609688 21:21:28 xxxxx-cluster yellow 2 2 185 185 0 0 185 0 - 50.0%

```

```auto
@172.19.0.2:9200/_cat/health
1665609878 21:24:38 xxxxx-cluster yellow 2 2 185 185 0 0 185 0 - 50.0%

```

---

<div class="post-metadata">

**Author:** ![JimG](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@JimG](https://discuss.elastic.co/u/JimG)\
**Post date:** [October 13, 2022, 1:01pm UTC](https://discuss.elastic.co/t/elasticsearch-status-yellow-how-to-fix-the-status/316467/4 "2022-10-13T13:01:56Z")

</div>

Hi.

I do not work for Elastic, im just another guy using Elastic-Stack.

1.) Try to open dev tools in kibana.  
1.a) Use the command: GET /\_cat/shards?v=true&h=index,shared,prirep,state,docs,store,node&s=state

After the command is used is all indices in the state "STARTED"? if not could be the reason, it happened to me.

2.) 2 nodes? i think you will need either 1,3,5,7 and so on, to prevent split-brain (prevent 2 cluster because both think they are master node)

---

<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:** [November 10, 2022, 1:02pm UTC](https://discuss.elastic.co/t/elasticsearch-status-yellow-how-to-fix-the-status/316467/5 "2022-11-10T13:02:32Z")

</div>

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