# Elasticsearch cluster status is yellow. Allocate missing replica shards

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow-allocate-missing-replica-shards/146146>\
**Category:** Elasticsearch\
**Created:** [August 27, 2018, 9:45am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow-allocate-missing-replica-shards/146146 "2018-08-27T09:45:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave21854207](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dave21854207](https://discuss.elastic.co/u/Dave21854207)\
**Post date:** [August 27, 2018, 9:45am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow-allocate-missing-replica-shards/146146/1 "2018-08-27T09:45:53Z")

</div>

Hi,  
Can i get some help with this error?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/0/80284363baba3da31a3da5ec10e588cc65671f8a.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/2/b2041f0cc36e8ea3f88bb48437375ea324b57920.png)

---

<div class="post-metadata">

**Author:** ![loren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loren/32/44942_2.png) [@loren](https://discuss.elastic.co/u/loren)\
**Post date:** [August 27, 2018, 5:09pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow-allocate-missing-replica-shards/146146/2 "2018-08-27T17:09:53Z")

</div>

Are both nodes set to act as data nodes, or just one?

---

<div class="post-metadata">

**Author:** ![Dave21854207](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dave21854207](https://discuss.elastic.co/u/Dave21854207)\
**Post date:** [August 28, 2018, 6:01am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow-allocate-missing-replica-shards/146146/3 "2018-08-28T06:01:54Z")

</div>

I have 1 Elasticsearch node and the other is for ML

After doing some more researching it appears the error is coming from only having 1 node for handling the primary and replica shards

Are there any risks involved having unassigned shards?

---

<div class="post-metadata">

**Author:** ![sandeepkanabar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeepkanabar/32/79399_2.png) [@sandeepkanabar](https://discuss.elastic.co/u/sandeepkanabar)\
**Post date:** [August 28, 2018, 6:32am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow-allocate-missing-replica-shards/146146/4 "2018-08-28T06:32:39Z")

</div>

By definition, a replica cannot be on same node as primary. Since you have only one node, you cannot have replicas. You can set replicas for all your indices to be `0` using the below:

```
PUT _settings
{
  "number_of_replicas": 0
}

```

Your cluster should return to `green` state once this command is acknowledged.

---

<div class="post-metadata">

**Author:** ![Dave21854207](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dave21854207](https://discuss.elastic.co/u/Dave21854207)\
**Post date:** [August 28, 2018, 7:40am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow-allocate-missing-replica-shards/146146/5 "2018-08-28T07:40:37Z")

</div>

Thanks sandeepkanabar! that worked.

---

<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 25, 2018, 7:40am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-status-is-yellow-allocate-missing-replica-shards/146146/6 "2018-09-25T07:40:37Z")

</div>

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