# Shard stucked in initializing state (elasticsearch crash test)

**URL:** <https://discuss.elastic.co/t/shard-stucked-in-initializing-state-elasticsearch-crash-test/15067>\
**Category:** Elasticsearch\
**Created:** [December 31, 2013, 8:24pm UTC](https://discuss.elastic.co/t/shard-stucked-in-initializing-state-elasticsearch-crash-test/15067 "2013-12-31T20:24:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karol\_Gwaj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karol_gwaj/32/1324_2.png) [@Karol\_Gwaj](https://discuss.elastic.co/u/Karol_Gwaj)\
**Post date:** [December 31, 2013, 8:24pm UTC](https://discuss.elastic.co/t/shard-stucked-in-initializing-state-elasticsearch-crash-test/15067/1 "2013-12-31T20:24:09Z")

</div>

Hi,

im doing crash test of small elasticsearch cluster):

- 3 ubuntu micro instance (EC2, 3 zones)
- 2 replicas (one per zone)
- 10 indexes (with 10 shards per index)
- 30k documents indexed in bulks (100 per batch) in parallel on every node
- swap disabled

im using micro instances to simulate a lot of crashes (i want to see  
cluster recovery in action)  
as could be expected it is crashing under load quite often (java process  
running out of memory)

overall it is working surprisingly well (no data loss as for now)  
the only annoying thing is, that sometimes some shard gets stuck in \*INITIALIZING  
\*state (and \_cluster/health shows _"yellow"_)

i left cluster running for the night but it didnt recovered  
also restarting node with misbehaving shard didnt helped (it stuck in  
INITIALIZING state after restart too)

any suggestion how to fix this ?

Cheers,

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b126ae21-ab16-4549-9331-5751f06fe496%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b126ae21-ab16-4549-9331-5751f06fe496%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [January 1, 2014, 12:13pm UTC](https://discuss.elastic.co/t/shard-stucked-in-initializing-state-elasticsearch-crash-test/15067/2 "2014-01-01T12:13:38Z")

</div>

Can you find out if the initializing shards were stuck because of a  
previous OOM? If so, there is not much that can be done except a node cold  
restart (JVM shutdown and start).

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoERPQEgpMAzwqNw9JpeUwpFWWu-qeqYVbtJ-%3DE-kRi%2BUw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoERPQEgpMAzwqNw9JpeUwpFWWu-qeqYVbtJ-%3DE-kRi%2BUw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [January 1, 2014, 12:16pm UTC](https://discuss.elastic.co/t/shard-stucked-in-initializing-state-elasticsearch-crash-test/15067/3 "2014-01-01T12:16:21Z")

</div>

Sorry, I just see tat you already restarted the node...

Is there something in the logs? At debug level? The cluster should tell  
about if it receives the shard at all, and maybe the reason why it rejects  
the shard.

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHeEcDz%3DhGv%2Bpb96Qk%3D3%3DDM-jnNpf26P%2BwKv7u%3DuE7%2Bzg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHeEcDz%3DhGv%2Bpb96Qk%3D3%3DDM-jnNpf26P%2BwKv7u%3DuE7%2Bzg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:58am UTC](https://discuss.elastic.co/t/shard-stucked-in-initializing-state-elasticsearch-crash-test/15067/4 "2017-07-06T01:58:51Z")

</div>


