Reputation: 41
I have a ES cluster showing the status as red.
{ "cluster_name": "elasticsearch", "status": "red", "timed_out": false, "number_of_nodes": 10, "number_of_data_nodes": 7, "active_primary_shards": 4431, "active_shards": 8862, "relocating_shards": 12, "initializing_shards": 0, "unassigned_shards": 20 }
I have so far tried to rolling restart the data nodes after disabling shard allocation, but cannot see any progress. Could someone be able to provide me a few hints on what to check further?
Upvotes: 4
Views: 14241
Reputation: 3973
As this post states, you may try to run this at your elasticsearch master so it tries to realocate the shred:
curl -XPOST localhost:9200/_cluster/reroute?retry_failed
In my case, it was able to recover the data and get the following message:
Elasticsearch cluster is green. Shards: 108 active, 0 initializing, 0 relocating, 0 unassigned...
Upvotes: 1
Reputation: 6869
You have "unassigned_shards": 20
in health check response. This is most likely caused because data nodes in the Elasticsearch cluster lack free storage space. As explained here you can:
Use the
/_cat/indices
Elasticsearch API to determine which of the indices are unassigned to nodes in your clusterYou can also use the
_cat/allocation?v
API to check shard allocation and disk usage.
Upvotes: 4