Replica shard does not get assigned to nodes after cluster recovery

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.

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

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

It is elasticsearch 2.3.3

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

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

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.

Hi,

Take a look at:

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

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.

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