# Replica Shard stuck in INITIALIZING state

**URL:** <https://discuss.elastic.co/t/replica-shard-stuck-in-initializing-state/19380>\
**Category:** Elasticsearch\
**Created:** [August 21, 2014, 4:24am UTC](https://discuss.elastic.co/t/replica-shard-stuck-in-initializing-state/19380 "2014-08-21T04:24:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peeyush\_Chandel](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@Peeyush\_Chandel](https://discuss.elastic.co/u/Peeyush_Chandel)\
**Post date:** [August 21, 2014, 4:24am UTC](https://discuss.elastic.co/t/replica-shard-stuck-in-initializing-state/19380/1 "2014-08-21T04:24:39Z")

</div>

Hi,

I stopped one of my elastic search node & as a normal behavior elastic  
search started relocating my shard on that node to another node.

But even after 15 hours it is still stuck in INITIALIZING state. Also that  
shard is fluctuating between two nodes,for some time it stays on one node  
then automatically shift to another node & keep on doing that after every  
few hours.

Main issue is it is still in INITIALIZING state after so many hours.

I am using version 1.2.1.

This shard which is stuck, it is a replica.

I am getting this error in logs:

```
[ERROR][index.engine.internal] [mynode] [myindex][3] failed to 

```

acquire searcher, source delete\_by\_query  
java.lang.NullPointerException  
[WARN][index.engine.internal] [mynode] [myindex][3] failed engine [  
deleteByQuery/shard failed on replica]  
[WARN][cluster.action.shard] [mynode] [myindex][3] sending failed  
shard for [myindex][3], node[Sp3URfNVQlq2i4i3EjCakw], [R], s[INITIALIZING],  
indexUUID [kTikCHshQMKEQ\_jAuWWWnw], reason [engine failure, message [  
deleteByQuery/shard failed on replica][EngineException[[myindex][3] failed  
to acquire searcher, source delete\_by\_query]; nested: NullPointerException;  
]]

Here is link

> <https://stackoverflow.com/questions/25418094/elasticsearch-shard-stuck-in-initializing-state>

--  
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/73eec403-4f1a-4671-b9a5-5efbcdf1c41f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/73eec403-4f1a-4671-b9a5-5efbcdf1c41f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Peeyush\_Chandel](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@Peeyush\_Chandel](https://discuss.elastic.co/u/Peeyush_Chandel)\
**Post date:** [August 21, 2014, 7:04am UTC](https://discuss.elastic.co/t/replica-shard-stuck-in-initializing-state/19380/2 "2014-08-21T07:04:37Z")

</div>

Only fix i got is:

I stopped deleteByQuery from my code.

Then i dropped all replicas & recreated them. Once all got stabilized.

I restarted deleteByQuery in my code.

That's how it worked for me & all back to normal.

On Thursday, 21 August 2014 09:54:39 UTC+5:30, Peeyush Chandel wrote:

> Hi,
> 
> I stopped one of my Elasticsearch node & as a normal behavior elastic  
> search started relocating my shard on that node to another node.
> 
> But even after 15 hours it is still stuck in INITIALIZING state. Also that  
> shard is fluctuating between two nodes,for some time it stays on one node  
> then automatically shift to another node & keep on doing that after every  
> few hours.
> 
> Main issue is it is still in INITIALIZING state after so many hours.
> 
> I am using version 1.2.1.
> 
> This shard which is stuck, it is a replica.
> 
> I am getting this error in logs:
> 
> ```
> [ERROR][index.engine.internal] [mynode] [myindex][3] failed to 
> 
> ```
> 
> acquire searcher, source delete\_by\_query  
> java.lang.NullPointerException  
> [WARN][index.engine.internal] [mynode] [myindex][3] failed  
> engine [deleteByQuery/shard failed on replica]  
> [WARN][cluster.action.shard] [mynode] [myindex][3] sending  
> failed shard for [myindex][3], node[Sp3URfNVQlq2i4i3EjCakw], [R], s[  
> INITIALIZING], indexUUID [kTikCHshQMKEQ\_jAuWWWnw], reason [engine failure,  
> message [deleteByQuery/shard failed on replica][EngineException[[myindex][  
> 3] failed to acquire searcher, source delete\_by\_query]; nested:  
> NullPointerException; ]]
> 
> Here is link  
> [Elasticsearch Shard stuck in INITIALIZING state - Stack Overflow](http://stackoverflow.com/questions/25418094/elasticsearch-shard-stuck-in-initializing-state)

--  
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/fc824e03-337f-4e7e-97c9-c0624caf8b26%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fc824e03-337f-4e7e-97c9-c0624caf8b26%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:07am UTC](https://discuss.elastic.co/t/replica-shard-stuck-in-initializing-state/19380/3 "2017-07-06T01:07:17Z")

</div>


