Index.routing.allocation.disable_allocation in Elastic Search 5.2


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?

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?

I though I found a magic answer :slight_smile:

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)

What does _cat/allocation show?

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:

How many nodes in your cluster?

When I did:

_nodes/process it shows me only one node:

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

cluster_name : elasticsearch,
nodes : {
"details of only one node"

And what does _cat/health show?

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

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

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.

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?

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

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 } }'.

ummm I got:

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

Remove the -d.

1 Like

(Also in curl I was unsuccesful

Thanks! It is not 100% healthy!

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