# Index Replication ends up in a cluster with yellow state

**URL:** <https://discuss.elastic.co/t/index-replication-ends-up-in-a-cluster-with-yellow-state/5064>\
**Category:** Elasticsearch\
**Created:** [August 5, 2011, 10:46am UTC](https://discuss.elastic.co/t/index-replication-ends-up-in-a-cluster-with-yellow-state/5064 "2011-08-05T10:46:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niko](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@Niko](https://discuss.elastic.co/u/Niko)\
**Post date:** [August 5, 2011, 10:46am UTC](https://discuss.elastic.co/t/index-replication-ends-up-in-a-cluster-with-yellow-state/5064/1 "2011-08-05T10:46:24Z")

</div>

Hi,  
we have created an index with version 0.17.1. After finishing the indexing  
process the cluster was in green state and then we tried to create more  
replicas (4) with the following call:

curl -XPUT 'localhost:9200/my\_index/\_settings' -d '  
{  
"index" : {  
"number\_of\_replicas" : 4  
}  
}

From this moment the cluster changed to yellow state and all of the new  
created shards remain unassigned. The index is still questionable but has  
none replica.

Do you have any idea what happened?

Thanks in advance,

Niko

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [August 5, 2011, 7:42pm UTC](https://discuss.elastic.co/t/index-replication-ends-up-in-a-cluster-with-yellow-state/5064/2 "2011-08-05T19:42:43Z")

</div>

How many nodes are you running? If you increase the number of replicas, then  
you need to have enough nodes for them to be allocated on (as a shard and  
its replica will not be allocated on the same node).

As a side note, when you increase the replica count, and you do have enough  
nodes for them to be allocated, the cluster will still be in a yellow state,  
until those replicas will recover the data and move to active mode.Yellow  
state means all primary shards are allocated, but not all replicas are  
allocated.

On Fri, Aug 5, 2011 at 1:46 PM, Niko Gross [niko.gross@googlemail.com](mailto:niko.gross@googlemail.com)wrote:

> Hi,  
> we have created an index with version 0.17.1. After finishing the indexing  
> process the cluster was in green state and then we tried to create more  
> replicas (4) with the following call:
> 
> curl -XPUT 'localhost:9200/my\_index/\_settings' -d '  
> {  
> "index" : {  
> "number\_of\_replicas" : 4  
> }  
> }
> 
> From this moment the cluster changed to yellow state and all of the new  
> created shards remain unassigned. The index is still questionable but has  
> none replica.
> 
> Do you have any idea what happened?
> 
> Thanks in advance,
> 
> Niko

---

<div class="post-metadata">

**Author:** ![Niko](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@Niko](https://discuss.elastic.co/u/Niko)\
**Post date:** [August 6, 2011, 1:20pm UTC](https://discuss.elastic.co/t/index-replication-ends-up-in-a-cluster-with-yellow-state/5064/3 "2011-08-06T13:20:46Z")

</div>

We're running the cluster with 21 nodes, so there should be enough nodes. But how long is the time the replicas need to recover the data and move to active mode. I thought this would be an almost instant process.

Am 05.08.2011 um 21:42 schrieb Shay Banon:

> How many nodes are you running? If you increase the number of replicas, then you need to have enough nodes for them to be allocated on (as a shard and its replica will not be allocated on the same node).
> 
> As a side note, when you increase the replica count, and you do have enough nodes for them to be allocated, the cluster will still be in a yellow state, until those replicas will recover the data and move to active mode.Yellow state means all primary shards are allocated, but not all replicas are allocated.
> 
> On Fri, Aug 5, 2011 at 1:46 PM, Niko Gross [niko.gross@googlemail.com](mailto:niko.gross@googlemail.com) wrote:  
> Hi,  
> we have created an index with version 0.17.1. After finishing the indexing process the cluster was in green state and then we tried to create more replicas (4) with the following call:
> 
> curl -XPUT 'localhost:9200/my\_index/\_settings' -d '  
> {  
> "index" : {  
> "number\_of\_replicas" : 4  
> }  
> }
> 
> From this moment the cluster changed to yellow state and all of the new created shards remain unassigned. The index is still questionable but has none replica.
> 
> Do you have any idea what happened?
> 
> Thanks in advance,
> 
> Niko

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [August 6, 2011, 5:01pm UTC](https://discuss.elastic.co/t/index-replication-ends-up-in-a-cluster-with-yellow-state/5064/4 "2011-08-06T17:01:13Z")

</div>

New replicas require replicating the data (per shard). That date needs to be  
transferred to the new replica shards, and the time it takes is the time it  
will take to transfer that data, and depends mainly on the size of the  
shards.

On Sat, Aug 6, 2011 at 4:20 PM, Nikolas Gross [niko.gross@googlemail.com](mailto:niko.gross@googlemail.com)wrote:

> We're running the cluster with 21 nodes, so there should be enough nodes.  
> But how long is the time the replicas need to recover the data and move to  
> active mode. I thought this would be an almost instant process.
> 
> Am 05.08.2011 um 21:42 schrieb Shay Banon:
> 
> How many nodes are you running? If you increase the number of replicas,  
> then you need to have enough nodes for them to be allocated on (as a shard  
> and its replica will not be allocated on the same node).
> 
> As a side note, when you increase the replica count, and you do have enough  
> nodes for them to be allocated, the cluster will still be in a yellow state,  
> until those replicas will recover the data and move to active mode.Yellow  
> state means all primary shards are allocated, but not all replicas are  
> allocated.
> 
> On Fri, Aug 5, 2011 at 1:46 PM, Niko Gross [niko.gross@googlemail.com](mailto:niko.gross@googlemail.com)wrote:
> 
> > Hi,  
> > we have created an index with version 0.17.1. After finishing the indexing  
> > process the cluster was in green state and then we tried to create more  
> > replicas (4) with the following call:
> > 
> > curl -XPUT 'localhost:9200/my\_index/\_settings' -d '  
> > {  
> > "index" : {  
> > "number\_of\_replicas" : 4  
> > }  
> > }
> > 
> > From this moment the cluster changed to yellow state and all of the new  
> > created shards remain unassigned. The index is still questionable but has  
> > none replica.
> > 
> > Do you have any idea what happened?
> > 
> > Thanks in advance,
> > 
> > Niko

---

<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 6, 2017, 3:58am UTC](https://discuss.elastic.co/t/index-replication-ends-up-in-a-cluster-with-yellow-state/5064/5 "2017-07-06T03:58:05Z")

</div>


