# Again added node (after crash) to a cluster won't get updated

**URL:** <https://discuss.elastic.co/t/again-added-node-after-crash-to-a-cluster-wont-get-updated/76040>\
**Category:** Elasticsearch\
**Created:** [February 22, 2017, 1:28pm UTC](https://discuss.elastic.co/t/again-added-node-after-crash-to-a-cluster-wont-get-updated/76040 "2017-02-22T13:28:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Ruijter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_ruijter/32/15766_2.png) [@Peter\_Ruijter](https://discuss.elastic.co/u/Peter_Ruijter)\
**Post date:** [February 22, 2017, 1:28pm UTC](https://discuss.elastic.co/t/again-added-node-after-crash-to-a-cluster-wont-get-updated/76040/1 "2017-02-22T13:28:42Z")

</div>

I have an ElasticSearch 2.4 cluster of three nodes. One of the nodes crashed yesterday, but I don’t get the data recovered on the failed node (which is online again and added to the cluster). On the two nodes that didn’t crash garbage collection info messages appear in the syslog and the CPU is continuous 100% while there are no processes that use ES right now. Any idea how to forge the sharing of shards between the nodes?

---

<div class="post-metadata">

**Author:** ![Peter\_Ruijter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_ruijter/32/15766_2.png) [@Peter\_Ruijter](https://discuss.elastic.co/u/Peter_Ruijter)\
**Post date:** [February 22, 2017, 2:55pm UTC](https://discuss.elastic.co/t/again-added-node-after-crash-to-a-cluster-wont-get-updated/76040/2 "2017-02-22T14:55:31Z")

</div>

Fixed it myself.. the nonreplication was caused by an index that appeared twice on two nodes with both the same shard number. After removing the index the replication started.

A nice way of getting this information and to forge relocation of a shard, you need first get the node names, doing something like this:  
`curl --silent -XGET 'http://172.31.24.32:9200/_nodes/stats?pretty=true' | grep -B10 172.31.24. | egrep "(ip|\:\ \{)"`

`NODE="thenodename" curl --silent -XGET http://172.31.24.32:9200/_cat/shards \ | grep UNASSIGNED \ | awk '{print $1, $2}' \ | while read index shard; do curl --silent -XPOST '172.31.24.32:9200/_cluster/reroute' -d "{ \"commands\" : [{ \"allocate\" : { \"index\" : \"${index}\", \"shard\" : ${shard}, \"node\" : \"${NODE}\", \"allow_primary\" : true } }] }" 2>&1>/dev/null; echo ; curl --silent 'http://172.31.24.32:9200/_cluster/health?pretty=true' \ | egrep '("unassigned_shards|status)' done`

Thanks to Antonino Abbate (@ninoabbate)

---

<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 22, 2017, 2:55pm UTC](https://discuss.elastic.co/t/again-added-node-after-crash-to-a-cluster-wont-get-updated/76040/3 "2017-03-22T14:55:33Z")

</div>

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