# Replica shard does not get assigned to nodes after cluster recovery

**URL:** https://discuss.elastic.co/t/replica-shard-does-not-get-assigned-to-nodes-after-cluster-recovery/74862
**Category:** Elasticsearch
**Created:** [February 13, 2017, 10:38am UTC](https://discuss.elastic.co/t/replica-shard-does-not-get-assigned-to-nodes-after-cluster-recovery/74862 "2017-02-13T10:38:47Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)
#### Post date: [February 13, 2017, 10:38am UTC](https://discuss.elastic.co/t/replica-shard-does-not-get-assigned-to-nodes-after-cluster-recovery/74862/1 "2017-02-13T10:38:47Z")

</div>

Hello,

I had the elasticsearch cluster down because the nodes lost connectivity to eachother. After successfully recovering all the unassigned shards and got the cluster back in green status. I started to bring up the other nodes then set the number\_of\_replicas to 1. But all the replicas are unassigned. How can I make them assigned so that I have a replica of each shard.

```
 {
          "state" : "UNASSIGNED",
          "primary" : false,
          "node" : null,
          "relocating_node" : null,
          "shard" : 0,
          "index" : "surrogate-keys-v1",
          "version" : 5,
          "unassigned_info" : {
            "reason" : "REPLICA_ADDED",
            "at" : "2017-02-13T10:28:11.068Z"
          }

```

thanks in advance.

---

<div class="post-metadata">

### Author: ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)
#### Post date: [February 13, 2017, 7:45pm UTC](https://discuss.elastic.co/t/replica-shard-does-not-get-assigned-to-nodes-after-cluster-recovery/74862/2 "2017-02-13T19:45:23Z")

</div>

What version are you using? We introduced a cluster allocation explain API in 5.x:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html)

What's the output of this command if you're on 5.x?

---

<div class="post-metadata">

### Author: ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)
#### Post date: [February 13, 2017, 8:02pm UTC](https://discuss.elastic.co/t/replica-shard-does-not-get-assigned-to-nodes-after-cluster-recovery/74862/3 "2017-02-13T20:02:54Z")

</div>

> [@msimos](#):
>
> What version are you using? We introduced a cluster allocation explain API in 5.x:

It is elasticsearch 2.3.3

---

<div class="post-metadata">

### Author: ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)
#### Post date: [February 13, 2017, 8:34pm UTC](https://discuss.elastic.co/t/replica-shard-does-not-get-assigned-to-nodes-after-cluster-recovery/74862/4 "2017-02-13T20:34:10Z")

</div>

You can use the reroute command and try and allocate the replica shard:

[https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-reroute.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-reroute.html)

Look for anything in the output that says NO and this is the check that's failing.

---

<div class="post-metadata">

### Author: ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)
#### Post date: [February 13, 2017, 8:48pm UTC](https://discuss.elastic.co/t/replica-shard-does-not-get-assigned-to-nodes-after-cluster-recovery/74862/5 "2017-02-13T20:48:49Z")

</div>

Very strange, I get this [NO(target node version [2.3.3] is older than source node version [2.3.4])]. However I've just checked all nodes has the same version of elasticsearch running.

---

<div class="post-metadata">

### Author: ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)
#### Post date: [February 13, 2017, 9:16pm UTC](https://discuss.elastic.co/t/replica-shard-does-not-get-assigned-to-nodes-after-cluster-recovery/74862/6 "2017-02-13T21:16:20Z")

</div>

Hi,

Take a look at:

GET \_cat/nodes?h=name,ip,version

---

<div class="post-metadata">

### Author: ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)
#### Post date: [February 13, 2017, 10:20pm UTC](https://discuss.elastic.co/t/replica-shard-does-not-get-assigned-to-nodes-after-cluster-recovery/74862/7 "2017-02-13T22:20:58Z")

</div>

Not sure why but one node was on version 2.3.4 while the other nodes where on 2.3.3. However the elasticsearch package install was 2.3.3 on all nodes. I have updated all the nodes to 2.3.4 and not everything is back on track.

Thanks for the help.

---

<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: [March 13, 2017, 10:22pm UTC](https://discuss.elastic.co/t/replica-shard-does-not-get-assigned-to-nodes-after-cluster-recovery/74862/8 "2017-03-13T22:22:00Z")

</div>

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