# Initializing Shards

**URL:** <https://discuss.elastic.co/t/initializing-shards/56416>\
**Category:** Elasticsearch\
**Created:** [July 26, 2016, 3:57pm UTC](https://discuss.elastic.co/t/initializing-shards/56416 "2016-07-26T15:57:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geezer](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Geezer](https://discuss.elastic.co/u/Geezer)\
**Post date:** [July 26, 2016, 3:57pm UTC](https://discuss.elastic.co/t/initializing-shards/56416/1 "2016-07-26T15:57:54Z")

</div>

Hello,

I have a three node cluster running ES 2.3.3. One of these was restarted by accident, since which time I have one index with two shards stuck in initializing state for the last day.

The indices are rolled over daily and this one is a week old, so it is not being written to and was not when the node restarted.

It is a small index (Store size: 2.6mb, Primary Store Size 1.6mb) and we have plenty of disk space on each node.

In this case, I can delete the whole index with no problems but I want to know how to fix this problem if it occurs with more important data.

These are the shards for that index. VAN-ELASTIC1 was the node which restarted:

root@van-elastic1 ~ ]# curl localhost:9200/\_cat/shards/logstash-hsl-f5-2016.07.20  
logstash-hsl-f5-2016.07.20 1 r STARTED 358 370.1kb 10.22.50.92 van-elastic2  
logstash-hsl-f5-2016.07.20 1 p STARTED 358 341.2kb 10.22.50.93 van-elastic3  
logstash-hsl-f5-2016.07.20 3 r INITIALIZING 10.22.50.92 van-elastic2  
logstash-hsl-f5-2016.07.20 3 p STARTED 349 372.4kb 10.22.50.93 van-elastic3  
logstash-hsl-f5-2016.07.20 4 r STARTED 345 350.4kb 10.22.50.92 van-elastic2  
logstash-hsl-f5-2016.07.20 4 p STARTED 345 350.4kb 10.22.50.93 van-elastic3  
logstash-hsl-f5-2016.07.20 2 r INITIALIZING 10.22.50.91 van-elastic1  
logstash-hsl-f5-2016.07.20 2 p STARTED 346 311.6kb 10.22.50.93 van-elastic3  
logstash-hsl-f5-2016.07.20 0 r STARTED 375 329.6kb 10.22.50.91 van-elastic1  
logstash-hsl-f5-2016.07.20 0 p STARTED 375 329.6kb 10.22.50.92 van-elastic2

Both initializing shards are replicas. Should I delete those shards and if so, how? If not, how can I get them started?

Thank you.

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [July 26, 2016, 4:05pm UTC](https://discuss.elastic.co/t/initializing-shards/56416/2 "2016-07-26T16:05:50Z")

</div>

Hello Geezer,

Could you please attach the logs of your nodes?

Thanks

---

<div class="post-metadata">

**Author:** ![Geezer](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Geezer](https://discuss.elastic.co/u/Geezer)\
**Post date:** [July 26, 2016, 5:07pm UTC](https://discuss.elastic.co/t/initializing-shards/56416/3 "2016-07-26T17:07:32Z")

</div>

Thank you for your reply. I have since done a synced flush and shut down all nodes. I adjusted the memory settings as I saw we were getting "Unable to lock JVM Memory: error=12,reason=Cannot allocate memory" warnings in the ES logs.

I made the changes recommended in this article:

[http://mrzard.github.io/blog/2015/03/25/elasticsearch-enable-mlockall-in-centos-7/](http://mrzard.github.io/blog/2015/03/25/elasticsearch-enable-mlockall-in-centos-7/)

When I restarted the ES service on all nodes, the status changed to green, so we are all good.

Thanks

---

<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, 10:32pm UTC](https://discuss.elastic.co/t/initializing-shards/56416/4 "2017-07-05T22:32:46Z")

</div>


