# Shards stuck on initialising

**URL:** <https://discuss.elastic.co/t/shards-stuck-on-initialising/19608>\
**Category:** Elasticsearch\
**Created:** [September 3, 2014, 9:56pm UTC](https://discuss.elastic.co/t/shards-stuck-on-initialising/19608 "2014-09-03T21:56:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![eistconn](https://avatars.discourse-cdn.com/v4/letter/e/22d042/32.png) [@eistconn](https://discuss.elastic.co/u/eistconn)\
**Post date:** [September 3, 2014, 9:56pm UTC](https://discuss.elastic.co/t/shards-stuck-on-initialising/19608/1 "2014-09-03T21:56:49Z")

</div>

I have a two node cluster and after restarting them the cluster does not  
assign all the shards.

On both nodes:  
elasticsearch 1.0.1  
$ java -version  
java version "1.7.0\_55"  
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1~0.12.04.2)  
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

Cluster health:  
{  
"cluster\_name" : "elastic\_bwn",  
"status" : "yellow",  
"timed\_out" : false,  
"number\_of\_nodes" : 2,  
"number\_of\_data\_nodes" : 2,  
"active\_primary\_shards" : 540,  
"active\_shards" : 607,  
"relocating\_shards" : 0,  
"initializing\_shards" : 2,  
"unassigned\_shards" : 471  
}

I am very new to elastic search, and even though I have Googled through  
similar problems and search in this group, I haven't found an answer.

Any help much appreciated.

--  
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/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 3, 2014, 10:46pm UTC](https://discuss.elastic.co/t/shards-stuck-on-initialising/19608/2 "2014-09-03T22:46:52Z")

</div>

If it's a replica, which it appears to be, then just drop the replicas on  
the problem index to 0 and then readd them.  
This is a quick and dirty fix, I'm not sure if there is a way to recover  
the underlying shard as it.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 4 September 2014 07:56, eistconn [david.mantock@gmail.com](mailto:david.mantock@gmail.com) wrote:

> I have a two node cluster and after restarting them the cluster does not  
> assign all the shards.
> 
> On both nodes:  
> elasticsearch 1.0.1  
> $ java -version  
> java version "1.7.0\_55"  
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1~0.12.04.2)  
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> 
> Cluster health:  
> {  
> "cluster\_name" : "elastic\_bwn",  
> "status" : "yellow",  
> "timed\_out" : false,  
> "number\_of\_nodes" : 2,  
> "number\_of\_data\_nodes" : 2,  
> "active\_primary\_shards" : 540,  
> "active\_shards" : 607,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 2,  
> "unassigned\_shards" : 471  
> }
> 
> I am very new to Elasticsearch, and even though I have Googled through  
> similar problems and search in this group, I haven't found an answer.
> 
> Any help much appreciated.
> 
> --  
> 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/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEM624ZXctNzZJiVyRchhM-46%2BcHnHQG7npo72db2t3uMu\_0yA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZXctNzZJiVyRchhM-46%2BcHnHQG7npo72db2t3uMu_0yA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![eistconn](https://avatars.discourse-cdn.com/v4/letter/e/22d042/32.png) [@eistconn](https://discuss.elastic.co/u/eistconn)\
**Post date:** [September 3, 2014, 10:58pm UTC](https://discuss.elastic.co/t/shards-stuck-on-initialising/19608/3 "2014-09-03T22:58:05Z")

</div>

I have been searching around on how to do that, but firstly how can you  
tell which is the problem index?

Or is there an easy way to drop all replicas - can you use wildcard for  
indexes:

curl -XPUT 'localhost:9200/logstash-\*/\_settings' -d '  
{  
"index" : {  
"number\_of\_replicas" : 0  
} }

On Thursday, 4 September 2014 00:47:38 UTC+2, Mark Walkom wrote:

> If it's a replica, which it appears to be, then just drop the replicas on  
> the problem index to 0 and then readd them.  
> This is a quick and dirty fix, I'm not sure if there is a way to recover  
> the underlying shard as it.
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com) \<javascript:\>  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 4 September 2014 07:56, eistconn \<[david....@gmail.com](mailto:david....@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > I have a two node cluster and after restarting them the cluster does not  
> > assign all the shards.
> > 
> > On both nodes:  
> > elasticsearch 1.0.1  
> > $ java -version  
> > java version "1.7.0\_55"  
> > OpenJDK Runtime Environment (IcedTea 2.4.7)  
> > (7u55-2.4.7-1ubuntu1~0.12.04.2)  
> > OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> > 
> > Cluster health:  
> > {  
> > "cluster\_name" : "elastic\_bwn",  
> > "status" : "yellow",  
> > "timed\_out" : false,  
> > "number\_of\_nodes" : 2,  
> > "number\_of\_data\_nodes" : 2,  
> > "active\_primary\_shards" : 540,  
> > "active\_shards" : 607,  
> > "relocating\_shards" : 0,  
> > "initializing\_shards" : 2,  
> > "unassigned\_shards" : 471  
> > }
> > 
> > I am very new to Elasticsearch, and even though I have Googled through  
> > similar problems and search in this group, I haven't found an answer.
> > 
> > Any help much appreciated.
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![andrew](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@andrew](https://discuss.elastic.co/u/andrew)\
**Post date:** [September 3, 2014, 11:01pm UTC](https://discuss.elastic.co/t/shards-stuck-on-initialising/19608/4 "2014-09-03T23:01:16Z")

</div>

This may give you some insight into what is going on: curl -XGET 'localhost:9200/\_cat/recovery?v'.

On Sep 3, 2014, at 3:58 PM, eistconn [david.mantock@gmail.com](mailto:david.mantock@gmail.com) wrote:

> I have been searching around on how to do that, but firstly how can you tell which is the problem index?
> 
> Or is there an easy way to drop all replicas - can you use wildcard for indexes:
> 
> curl -XPUT 'localhost:9200/logstash-\*/\_settings' -d '  
> {  
> "index" : {  
> "number\_of\_replicas" : 0  
> } }
> 
> On Thursday, 4 September 2014 00:47:38 UTC+2, Mark Walkom wrote:  
> If it's a replica, which it appears to be, then just drop the replicas on the problem index to 0 and then readd them.  
> This is a quick and dirty fix, I'm not sure if there is a way to recover the underlying shard as it.
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com)  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 4 September 2014 07:56, eistconn [david....@gmail.com](mailto:david....@gmail.com) wrote:  
> I have a two node cluster and after restarting them the cluster does not assign all the shards.
> 
> On both nodes:  
> elasticsearch 1.0.1  
> $ java -version  
> java version "1.7.0\_55"  
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1~0.12.04.2)  
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> 
> Cluster health:  
> {  
> "cluster\_name" : "elastic\_bwn",  
> "status" : "yellow",  
> "timed\_out" : false,  
> "number\_of\_nodes" : 2,  
> "number\_of\_data\_nodes" : 2,  
> "active\_primary\_shards" : 540,  
> "active\_shards" : 607,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 2,  
> "unassigned\_shards" : 471  
> }
> 
> I am very new to Elasticsearch, and even though I have Googled through similar problems and search in this group, I haven't found an answer.
> 
> Any help much appreciated.
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/51A07A6A-C62B-4A5E-B861-D2F60227FFEF%40elasticsearch.com](https://groups.google.com/d/msgid/elasticsearch/51A07A6A-C62B-4A5E-B861-D2F60227FFEF%40elasticsearch.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 3, 2014, 11:02pm UTC](https://discuss.elastic.co/t/shards-stuck-on-initialising/19608/5 "2014-09-03T23:02:48Z")

</div>

Yes you can use wildcards.

The easiest way to tell would be to use the cat APIs, eg \_cat/shards?v

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 4 September 2014 08:58, eistconn [david.mantock@gmail.com](mailto:david.mantock@gmail.com) wrote:

> I have been searching around on how to do that, but firstly how can you  
> tell which is the problem index?
> 
> Or is there an easy way to drop all replicas - can you use wildcard for  
> indexes:
> 
> curl -XPUT 'localhost:9200/logstash-\*/\_settings' -d '  
> {  
> "index" : {
> 
> ```
> "number_of_replicas" : 0
> 
> } }
> 
> ```
> 
> On Thursday, 4 September 2014 00:47:38 UTC+2, Mark Walkom wrote:
> 
> > If it's a replica, which it appears to be, then just drop the replicas on  
> > the problem index to 0 and then readd them.  
> > This is a quick and dirty fix, I'm not sure if there is a way to recover  
> > the underlying shard as it.
> > 
> > Regards,  
> > Mark Walkom
> > 
> > Infrastructure Engineer  
> > Campaign Monitor  
> > email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com)  
> > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > 
> > On 4 September 2014 07:56, eistconn [david....@gmail.com](mailto:david....@gmail.com) wrote:
> > 
> > > I have a two node cluster and after restarting them the cluster does not  
> > > assign all the shards.
> > > 
> > > On both nodes:  
> > > elasticsearch 1.0.1  
> > > $ java -version  
> > > java version "1.7.0\_55"  
> > > OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1~0.12.04.  
> > > 2)  
> > > OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> > > 
> > > Cluster health:  
> > > {  
> > > "cluster\_name" : "elastic\_bwn",  
> > > "status" : "yellow",  
> > > "timed\_out" : false,  
> > > "number\_of\_nodes" : 2,  
> > > "number\_of\_data\_nodes" : 2,  
> > > "active\_primary\_shards" : 540,  
> > > "active\_shards" : 607,  
> > > "relocating\_shards" : 0,  
> > > "initializing\_shards" : 2,  
> > > "unassigned\_shards" : 471  
> > > }
> > > 
> > > I am very new to Elasticsearch, and even though I have Googled through  
> > > similar problems and search in this group, I haven't found an answer.
> > > 
> > > Any help much appreciated.
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEM624Zo%2BV%3Dutx2LA6WoHgHcjqrhGdy9njEOvrbaj9%3Db5pU%3DEw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624Zo%2BV%3Dutx2LA6WoHgHcjqrhGdy9njEOvrbaj9%3Db5pU%3DEw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![eistconn](https://avatars.discourse-cdn.com/v4/letter/e/22d042/32.png) [@eistconn](https://discuss.elastic.co/u/eistconn)\
**Post date:** [September 3, 2014, 11:22pm UTC](https://discuss.elastic.co/t/shards-stuck-on-initialising/19608/6 "2014-09-03T23:22:13Z")

</div>

Just did this:

curl -XPUT 'localhost:9200/\_settings' -d ' {"index.routing.allocation.disable\_allocation": false}'

Seems to have done the trick. Shards are now being assigned.

On Thursday, 4 September 2014 01:03:15 UTC+2, Mark Walkom wrote:

> Yes you can use wildcards.
> 
> The easiest way to tell would be to use the cat APIs, eg \_cat/shards?v
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com) \<javascript:\>  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 4 September 2014 08:58, eistconn \<[david....@gmail.com](mailto:david....@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > I have been searching around on how to do that, but firstly how can you  
> > tell which is the problem index?
> > 
> > Or is there an easy way to drop all replicas - can you use wildcard for  
> > indexes:
> > 
> > curl -XPUT 'localhost:9200/logstash-\*/\_settings' -d '
> > 
> > {  
> > "index" : {
> > 
> > ```
> > "number_of_replicas" : 0
> > 
> > } }
> > 
> > ```
> > 
> > On Thursday, 4 September 2014 00:47:38 UTC+2, Mark Walkom wrote:
> > 
> > > If it's a replica, which it appears to be, then just drop the replicas  
> > > on the problem index to 0 and then readd them.  
> > > This is a quick and dirty fix, I'm not sure if there is a way to recover  
> > > the underlying shard as it.
> > > 
> > > Regards,  
> > > Mark Walkom
> > > 
> > > Infrastructure Engineer  
> > > Campaign Monitor  
> > > email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com)  
> > > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > > 
> > > On 4 September 2014 07:56, eistconn [david....@gmail.com](mailto:david....@gmail.com) wrote:
> > > 
> > > > I have a two node cluster and after restarting them the cluster does  
> > > > not assign all the shards.
> > > > 
> > > > On both nodes:  
> > > > elasticsearch 1.0.1  
> > > > $ java -version  
> > > > java version "1.7.0\_55"  
> > > > OpenJDK Runtime Environment (IcedTea 2.4.7)  
> > > > (7u55-2.4.7-1ubuntu1~0.12.04.2)  
> > > > OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> > > > 
> > > > Cluster health:  
> > > > {  
> > > > "cluster\_name" : "elastic\_bwn",  
> > > > "status" : "yellow",  
> > > > "timed\_out" : false,  
> > > > "number\_of\_nodes" : 2,  
> > > > "number\_of\_data\_nodes" : 2,  
> > > > "active\_primary\_shards" : 540,  
> > > > "active\_shards" : 607,  
> > > > "relocating\_shards" : 0,  
> > > > "initializing\_shards" : 2,  
> > > > "unassigned\_shards" : 471  
> > > > }
> > > > 
> > > > I am very new to Elasticsearch, and even though I have Googled through  
> > > > similar problems and search in this group, I haven't found an answer.
> > > > 
> > > > Any help much appreciated.
> > > > 
> > > > --  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/97b0e80d-db9e-446b-b10f-b5679d532e51%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/97b0e80d-db9e-446b-b10f-b5679d532e51%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 3, 2014, 11:27pm UTC](https://discuss.elastic.co/t/shards-stuck-on-initialising/19608/7 "2014-09-03T23:27:56Z")

</div>

Oh right, yeah that'd fix it too 😛

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 4 September 2014 09:22, eistconn [david.mantock@gmail.com](mailto:david.mantock@gmail.com) wrote:

> Just did this:
> 
> curl -XPUT 'localhost:9200/\_settings' -d ' {"index.routing.allocation.disable\_allocation": false}'
> 
> Seems to have done the trick. Shards are now being assigned.
> 
> On Thursday, 4 September 2014 01:03:15 UTC+2, Mark Walkom wrote:
> 
> > Yes you can use wildcards.
> > 
> > The easiest way to tell would be to use the cat APIs, eg \_cat/shards?v
> > 
> > Regards,  
> > Mark Walkom
> > 
> > Infrastructure Engineer  
> > Campaign Monitor  
> > email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com)  
> > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > 
> > On 4 September 2014 08:58, eistconn [david....@gmail.com](mailto:david....@gmail.com) wrote:
> > 
> > > I have been searching around on how to do that, but firstly how can  
> > > you tell which is the problem index?
> > > 
> > > Or is there an easy way to drop all replicas - can you use wildcard for  
> > > indexes:
> > > 
> > > curl -XPUT 'localhost:9200/logstash-\*/\_settings' -d '
> > > 
> > > {  
> > > "index" : {
> > > 
> > > ```
> > > "number_of_replicas" : 0
> > > 
> > > } }
> > > 
> > > ```
> > > 
> > > On Thursday, 4 September 2014 00:47:38 UTC+2, Mark Walkom wrote:
> > > 
> > > > If it's a replica, which it appears to be, then just drop the replicas  
> > > > on the problem index to 0 and then readd them.  
> > > > This is a quick and dirty fix, I'm not sure if there is a way to  
> > > > recover the underlying shard as it.
> > > > 
> > > > Regards,  
> > > > Mark Walkom
> > > > 
> > > > Infrastructure Engineer  
> > > > Campaign Monitor  
> > > > email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com)  
> > > > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > > > 
> > > > On 4 September 2014 07:56, eistconn [david....@gmail.com](mailto:david....@gmail.com) wrote:
> > > > 
> > > > > I have a two node cluster and after restarting them the cluster does  
> > > > > not assign all the shards.
> > > > > 
> > > > > On both nodes:  
> > > > > elasticsearch 1.0.1  
> > > > > $ java -version  
> > > > > java version "1.7.0\_55"  
> > > > > OpenJDK Runtime Environment (IcedTea 2.4.7)  
> > > > > (7u55-2.4.7-1ubuntu1~0.12.04.2)  
> > > > > OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> > > > > 
> > > > > Cluster health:  
> > > > > {  
> > > > > "cluster\_name" : "elastic\_bwn",  
> > > > > "status" : "yellow",  
> > > > > "timed\_out" : false,  
> > > > > "number\_of\_nodes" : 2,  
> > > > > "number\_of\_data\_nodes" : 2,  
> > > > > "active\_primary\_shards" : 540,  
> > > > > "active\_shards" : 607,  
> > > > > "relocating\_shards" : 0,  
> > > > > "initializing\_shards" : 2,  
> > > > > "unassigned\_shards" : 471  
> > > > > }
> > > > > 
> > > > > I am very new to Elasticsearch, and even though I have Googled  
> > > > > through similar problems and search in this group, I haven't found an  
> > > > > answer.
> > > > > 
> > > > > Any help much appreciated.
> > > > > 
> > > > > --  
> > > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40goo  
> > > > > [glegroups.com](http://glegroups.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8f257a81-5f16-4e7c-b0bb-9a580a198412%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > .  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/a25b48fc-b6fb-45bb-841a-720a0fd65e86%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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/97b0e80d-db9e-446b-b10f-b5679d532e51%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/97b0e80d-db9e-446b-b10f-b5679d532e51%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/97b0e80d-db9e-446b-b10f-b5679d532e51%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/97b0e80d-db9e-446b-b10f-b5679d532e51%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEM624YjPW636rjOBrzixL1vr7m6VpNe4cZQxL6MF5nWMuczpA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624YjPW636rjOBrzixL1vr7m6VpNe4cZQxL6MF5nWMuczpA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Malini](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Malini](https://discuss.elastic.co/u/Malini)\
**Post date:** [September 9, 2015, 11:57pm UTC](https://discuss.elastic.co/t/shards-stuck-on-initialising/19608/8 "2015-09-09T23:57:53Z")

</div>

I have 3 node cluster with two replicas. Our cluster was running fine and I had to restart elasticsearch.  
After the restart I am saw 2 unassigned shards.  
So I ran the following command  
curl -XPUT 'localhost:9200/\_settings' \ -d '{"index.routing.allocation.disable\_allocation": false}'

which assigned all the shards.

What does that command mean? Should I do this if I see unassigned shards? Would this have any affect on future indicies etc?

Thanks  
-Malini

---

<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:51pm UTC](https://discuss.elastic.co/t/shards-stuck-on-initialising/19608/9 "2017-07-05T23:51:26Z")

</div>


