Unassigned shards on es 5.5.1


(Guy Barnea) #1

Hello,
Im running elasticSearch 5.5.1 on port 9200.
I have a problem with its shards :
not all of them are assign and right now , I dont have access to all of my files in my indexes.
How can i solve this problem?
Thanks


(Christian Dahlqvist) #2

It would help if you provided some additional information about your cluster. What does the cluster heath API give?


(Guy Barnea) #3

This is my cluster health :

{

"cluster_name": "master",

"status": "red",

"timed_out": false,

"number_of_nodes": 1,

"number_of_data_nodes": 1,

"active_primary_shards": 28,

"active_shards": 28,

"relocating_shards": 0,

"initializing_shards": 0,

"unassigned_shards": 195,

"delayed_unassigned_shards": 0,

"number_of_pending_tasks": 0,

"number_of_in_flight_fetch": 0,

"task_max_waiting_in_queue_millis": 0,

"active_shards_percent_as_number": 12.556053811659194

}


(Christian Dahlqvist) #4

You can use the cluster allocation explain API to see why a certain shard is not allocated. Please run this against a few and post the results here.


(Guy Barnea) #5

I have several indices but i get only one index from the API,


(Christian Dahlqvist) #6

What do you get if you use the cat shards API?


(Guy Barnea) #7

I get a lot of rows like :

justice 2 p UNASSIGNED
justice 2 r UNASSIGNED


(Christian Dahlqvist) #8

And what does the cluster allocation explain API give?

GET /_cluster/allocation/explain
{
  "index": "justice",
  "shard": 2,
  "primary": true
}

(Guy Barnea) #9

it gives me info about sone other index (that created auto)

{

"index": ".watches",

"shard": 0,

"primary": false,

"current_state": "unassigned",

"unassigned_info":{

"reason": "CLUSTER_RECOVERED",

"at": "2018-09-17T07:20:45.494Z",

"last_allocation_status": "no_attempt"

},

"can_allocate": "no",

"allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes",

"node_allocation_decisions":[

{"node_id": "Y3a7Me1vRzqpA6yWGbZbjg", "node_name": "Y3a7Me1", "transport_address": "xx.xx.xx.xxx:9302",…}

]

}


(system) #10

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