# Elasticsearch is not starting after the restart

**URL:** <https://discuss.elastic.co/t/elasticsearch-is-not-starting-after-the-restart/40695>\
**Category:** Elasticsearch\
**Created:** [February 2, 2016, 7:00am UTC](https://discuss.elastic.co/t/elasticsearch-is-not-starting-after-the-restart/40695 "2016-02-02T07:00:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mramaprasad](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@mramaprasad](https://discuss.elastic.co/u/mramaprasad)\
**Post date:** [February 2, 2016, 7:00am UTC](https://discuss.elastic.co/t/elasticsearch-is-not-starting-after-the-restart/40695/1 "2016-02-02T07:00:38Z")

</div>

We have 3 nodes. nodes are not coming back up after the restart. I get following errors

nested: RecoverFilesRecoveryException[Failed to transfer [0] files with total size of [0b]]; nested: IllegalStateException[try to recover [csv3][1] from primary shard with sync id but number of docs differ: 471350 lnode01, primary) vs 471351(node2)]; ]

aused by: RemoteTransportException[[node2][172.16.168.93:9300][internal:index/shard/recovery/start\_recovery]]; nested: RecoveryEngineException[Phase[1] phase1 failed]; nested: RecoverFilesRecoveryException[Failed to transfer [0] files with total size of [0b]]; nested: IllegalStateException[try to recover [csv3][1] from primary shard with sync id but number of docs differ: 471350 (node01, primary) vs 471351 node2)];  
Caused by: [csv3][[csv3][1]] RecoveryEngineException[Phase[1] phase1 failed]; nested: RecoverFilesRecoveryException[Failed to transfer [0] files with total size of [0b]]; nested: IllegalStateException[try to recover [csv3][1] from primary shard with sync id but number of docs differ: 471350 (node01, primary) vs 471351(node2];  
at org.elasticsearch.indices.recovery.RecoverySourceHandler.recoverToTarget(RecoverySourceHandler.java:135)

Any idea how to fix this [lease?

---

<div class="post-metadata">

**Author:** ![abhijitdeka11](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@abhijitdeka11](https://discuss.elastic.co/u/abhijitdeka11)\
**Post date:** [February 2, 2016, 9:33am UTC](https://discuss.elastic.co/t/elasticsearch-is-not-starting-after-the-restart/40695/2 "2016-02-02T09:33:25Z")

</div>

can you try  
/\_cluster/health?pretty is there any unassigned\_shards?

---

<div class="post-metadata">

**Author:** ![mramaprasad](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@mramaprasad](https://discuss.elastic.co/u/mramaprasad)\
**Post date:** [February 2, 2016, 8:11pm UTC](https://discuss.elastic.co/t/elasticsearch-is-not-starting-after-the-restart/40695/3 "2016-02-02T20:11:13Z")

</div>

Yes.

curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'

{

"cluster\_name" : "ixxx",

"status" : "yellow",

"timed\_out" : false,

"number\_of\_nodes" : 3,

"number\_of\_data\_nodes" : 3,

"active\_primary\_shards" : 3,

"active\_shards" : 5,

"relocating\_shards" : 0,

"initializing\_shards" : 2,

"unassigned\_shards" : 2,

"delayed\_unassigned\_shards" : 0,

"number\_of\_pending\_tasks" : 0,

"number\_of\_in\_flight\_fetch" : 0,

"task\_max\_waiting\_in\_queue\_millis" : 0,

"active\_shards\_percent\_as\_number" : 55.55555555555556

}

---

<div class="post-metadata">

**Author:** ![mramaprasad](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@mramaprasad](https://discuss.elastic.co/u/mramaprasad)\
**Post date:** [February 2, 2016, 8:19pm UTC](https://discuss.elastic.co/t/elasticsearch-is-not-starting-after-the-restart/40695/4 "2016-02-02T20:19:54Z")

</div>

After a while I see unassigned shards as 0. but initializing shards as 3.  
"status" : "yellow",  
"timed\_out" : false,  
"number\_of\_nodes" : 3,  
"number\_of\_data\_nodes" : 3,  
"active\_primary\_shards" : 3,  
"active\_shards" : 6,  
"relocating\_shards" : 0,  
"initializing\_shards" : 3,  
"unassigned\_shards" : 0,  
"delayed\_unassigned\_shards" : 0,  
"number\_of\_pending\_tasks" : 0,  
"number\_of\_in\_flight\_fetch" : 0,  
"task\_max\_waiting\_in\_queue\_millis" : 0,  
"active\_shards\_percent\_as\_number" : 66.66666666666666

---

<div class="post-metadata">

**Author:** ![abhijitdeka11](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@abhijitdeka11](https://discuss.elastic.co/u/abhijitdeka11)\
**Post date:** [February 3, 2016, 6:09am UTC](https://discuss.elastic.co/t/elasticsearch-is-not-starting-after-the-restart/40695/5 "2016-02-03T06:09:57Z")

</div>

If it's initializing then i guess the only thing you can try is restarting the nodes  
Please see this blog  
[https://t37.net/how-to-fix-your-elasticsearch-cluster-stuck-in-initializing-shards-mode.html](https://t37.net/how-to-fix-your-elasticsearch-cluster-stuck-in-initializing-shards-mode.html)

To avoid this situation this is the permanent solution

> <https://stackoverflow.com/questions/19967472/elasticsearch-unassigned-shards-how-to-fix>

---

<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, 11:19pm UTC](https://discuss.elastic.co/t/elasticsearch-is-not-starting-after-the-restart/40695/6 "2017-07-05T23:19:22Z")

</div>


