# Index.routing.allocation.disable\_allocation in Elastic Search 5.2

**URL:** <https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603>\
**Category:** Elasticsearch\
**Created:** [March 30, 2017, 7:09am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603 "2017-03-30T07:09:28Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 30, 2017, 7:09am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/1 "2017-03-30T07:09:28Z")

</div>

Hi,

I got a problem of many "unassigned shards". So through some reading I tryed to do :  
`index.routing.allocation.disable_allocation= false`

This returned me:

> index.routing.allocation.disable\_allocation please check that any required plugins are installed

Looking around I didnt find such plugins. Also I didnt yet see a reference in ES 5.X for "index.routing.allocation.disable\_allocation". Is there such an option in ES 5.2?

If no, what should I do?

Also if someone knows from what can this problem can happen, and what other solutions are there?

---

<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:** [March 30, 2017, 7:13am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/2 "2017-03-30T07:13:13Z")

</div>

Simply setting this won't help unless you have already disabled allocation.

So, why are these unallocated? What do your logs show? How many shards, are they primary or replica?

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 30, 2017, 7:34am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/3 "2017-03-30T07:34:50Z")

</div>

I though I found a magic answer 🙂

I dont know why, the machines that I am working on are not from our company but an outside one. From my understanding they copied the VM of the ES a few times, and copied the VMs of from where the filebeats sends the logs to ES

What logs?

I actualy don't understand enough in shards. So I can't answer the 3rd question.

When looking at the logs of logstash, I get:

error: "failed to derive xcontent" (but I am not sure this is connected)  
(Thanks on the quick reply)

---

<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:** [March 30, 2017, 7:45am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/4 "2017-03-30T07:45:17Z")

</div>

What does `_cat/allocation` show?

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 30, 2017, 7:49am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/5 "2017-03-30T07:49:29Z")

</div>

Since the machine I am working on is secure I cant copy paste from there or work with internet therefore I will not copy but type in the releavent parts:

I got a bunch of numbers then KppASWN  
and then I got:  
51 UNASSIGNED

---

<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:** [March 30, 2017, 7:50am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/6 "2017-03-30T07:50:54Z")

</div>

How many nodes in your cluster?

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 30, 2017, 8:22am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/7 "2017-03-30T08:22:32Z")

</div>

When I did:

\_nodes/process it shows me only one node:

> "\_nodes": {  
> "total" : 1,  
> ... ),

> cluster\_name : elasticsearch,  
> nodes : {  
> "details of only one node"  
> }

---

<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:** [March 30, 2017, 8:24am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/8 "2017-03-30T08:24:23Z")

</div>

And what does `_cat/health` show?

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 30, 2017, 8:27am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/9 "2017-03-30T08:27:37Z")

</div>

1490862395 "time" elasticsearch yellow 1 1 51 51 0 0 51 0 - 50.0%

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 30, 2017, 8:28am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/10 "2017-03-30T08:28:36Z")

</div>

by the way:  
when I typed in \_cat /allocation:

one of the numbers that was in kppASWN... was 51 and also it was in the UNASSIGNED section

---

<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:** [March 30, 2017, 8:28am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/11 "2017-03-30T08:28:41Z")

</div>

Then everything is ok.

You cannot assign replica and primary shards to a single node, so to clear that up you need another node, or to remove the replicas.

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 30, 2017, 8:32am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/12 "2017-03-30T08:32:29Z")

</div>

So if I open a new ElasticSearch instance (which opens a new node) this will fix the problem?

A few questions regarding this:

1- how to erase replicas?  
2 - how did this happen how did replicas come upon?  
3 - how opening a new node will solve it, does ES know how to allocate shards automatically?

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 30, 2017, 8:33am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/13 "2017-03-30T08:33:04Z")

</div>

I probably will erase the replicas for a fast answer and build later a new node (another ES)

---

<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:** [March 30, 2017, 8:34am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/14 "2017-03-30T08:34:10Z")

</div>

Replica's are added by default and will be automatically assigned by ES if you add more nodes to the cluster.  
You can dynamically change the number of replicas using something like;  
`curl -XPUT localhost:9200/*/_settings -d '{ "index" : { "number_of_replicas" : 0 } }'`.

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 30, 2017, 8:44am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/15 "2017-03-30T08:44:56Z")

</div>

ummm I got:

 ![](https://us1.discourse-cdn.com/elastic/original/3X/3/3/33087e0d889a1d9361d952be804c64a77c353177.png)

Sorry that it is a picture and not the text (security reasons)

---

<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:** [March 30, 2017, 8:45am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/16 "2017-03-30T08:45:18Z")

</div>

Remove the `-d`.

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 30, 2017, 8:45am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/17 "2017-03-30T08:45:24Z")

</div>

(Also in curl I was unsuccesful

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 30, 2017, 8:45am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/18 "2017-03-30T08:45:55Z")

</div>

Thanks! It is not 100% healthy!

---

<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:** [April 27, 2017, 8:45am UTC](https://discuss.elastic.co/t/index-routing-allocation-disable-allocation-in-elastic-search-5-2/80603/19 "2017-04-27T08:45:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
