# I am facing issue of cluster health as yellow becasu of some unassign shared

**URL:** <https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272>\
**Category:** Elasticsearch\
**Created:** [July 25, 2016, 8:26am UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272 "2016-07-25T08:26:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkatesh\_manne](https://avatars.discourse-cdn.com/v4/letter/v/b9bd4f/32.png) [@venkatesh\_manne](https://discuss.elastic.co/u/venkatesh_manne)\
**Post date:** [July 25, 2016, 8:26am UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272/1 "2016-07-25T08:26:47Z")

</div>

```
{
    "cluster_name": "app_search",
    "status": "yellow",
    "timed_out": false,
    "number_of_nodes": 2,
    "number_of_data_nodes": 2,
    "active_primary_shards": 5,
    "active_shards": 10,
    "relocating_shards": 0,
    "initializing_shards": 0,
    "unassigned_shards": 5,
    "delayed_unassigned_shards": 0,
    "number_of_pending_tasks": 0,
    "number_of_in_flight_fetch": 0
}

```

i tried with below approach

1)my cluster health was red then i have deleted data folder then cluster health became green after that i have created mapping it's turned to yellow, so if i am missing anything please help me out on this.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 25, 2016, 8:28am UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272/2 "2016-07-25T08:28:42Z")

</div>

So are you asking for assistance here, or just telling us your cluster is yellow?

---

<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:** [July 25, 2016, 9:36am UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272/3 "2016-07-25T09:36:53Z")

</div>

My guess is that you defined the number of replicas to 2.

---

<div class="post-metadata">

**Author:** ![venkatesh\_manne](https://avatars.discourse-cdn.com/v4/letter/v/b9bd4f/32.png) [@venkatesh\_manne](https://discuss.elastic.co/u/venkatesh_manne)\
**Post date:** [July 25, 2016, 9:54am UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272/4 "2016-07-25T09:54:29Z")

</div>

Thanks for your replay, Yes David , I have define index.number\_of\_replicas:2 is it ok or not

---

<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:** [July 25, 2016, 10:23am UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272/5 "2016-07-25T10:23:37Z")

</div>

So everything is correct here.

You have 5 primary shards + 2 copies of each which means 15 shards to allocate.

On a 2 nodes cluster, you will end up with

- 5 primary shards
- 5 replica shards

If you add a new node you will allocate:

- 5 primary shards
- 5 replica shards
- 5 replica shards

---

<div class="post-metadata">

**Author:** ![venkatesh\_manne](https://avatars.discourse-cdn.com/v4/letter/v/b9bd4f/32.png) [@venkatesh\_manne](https://discuss.elastic.co/u/venkatesh_manne)\
**Post date:** [July 25, 2016, 10:53am UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272/6 "2016-07-25T10:53:42Z")

</div>

thanks for your response David.

if everything seems correct, does this mean cluster health yellow will not make any problem in future ?

---

<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:** [July 25, 2016, 12:14pm UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272/7 "2016-07-25T12:14:14Z")

</div>

The question is "why did you change the number of replicas?".

I won't keep a yellow cluster in production.  
If a node stops, you won't be able to index new data because of the quorum.

So if you want to have only 2 data nodes, keep number of replicas to 1.  
But in any case add a 3rd node to avoid split brain issue. Can be a master only node which will act as a tie breaker.

---

<div class="post-metadata">

**Author:** ![venkatesh\_manne](https://avatars.discourse-cdn.com/v4/letter/v/b9bd4f/32.png) [@venkatesh\_manne](https://discuss.elastic.co/u/venkatesh_manne)\
**Post date:** [July 26, 2016, 10:36am UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272/8 "2016-07-26T10:36:47Z")

</div>

Thanks for your response David , I am New to Elastic Search, How can I change cluster health yellow to green is there any way to do that.

---

<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:** [July 26, 2016, 12:04pm UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272/9 "2016-07-26T12:04:38Z")

</div>

If you are new to elasticsearch, why did you change the replica settings?

Change that. Read: [https://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-update-settings.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-update-settings.html)

---

<div class="post-metadata">

**Author:** ![venkatesh\_manne](https://avatars.discourse-cdn.com/v4/letter/v/b9bd4f/32.png) [@venkatesh\_manne](https://discuss.elastic.co/u/venkatesh_manne)\
**Post date:** [September 14, 2016, 7:51am UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272/10 "2016-09-14T07:51:45Z")

</div>

Hi David, I have 3 server's i need to sync the data of this 3 server's how can i do in elasticsearch(cluster name and index name is same in all server's,in every server i have install elasticsearch separately )

Example:10.141.4.221 is Load Balancing it's have 3 server's (10.141.2.2,10.141.2.3,10.142.2.4) cluster and index name is same in all server's

---

<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:** [July 5, 2017, 10:20pm UTC](https://discuss.elastic.co/t/i-am-facing-issue-of-cluster-health-as-yellow-becasu-of-some-unassign-shared/56272/11 "2017-07-05T22:20:03Z")

</div>


