Hi,
For a while now I have been dealing with an issue with Elasticsearch's health becoming red and not processing data. I tried to troubleshoot it myself, but I don't think I've made any huge progress in determining the exact cause.
{
"cluster_name" : "elasticsearch",
"status" : "red",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 54,
"active_shards" : 54,
"relocating_shards" : 0,
"initializing_shards" : 4,
"unassigned_shards" : 184,
"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" : 22.31404958677686
}
The first thing I noticed was that I have lots of "unassigned_shards", I don't really know what these are to be very honest but I'm pretty sure they shouldn't be unassigned?
I took a look at my indexes by listing them with curl 'localhost:9200/_cat/indices?v'
and noticed that I had two red indexes and everything else was yellow. Since the data isn't that important I went ahead and deleted the red indexes.
After deleting the red indexes my Elasticsearch went to yellow and started processing data once again.
{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 131,
"active_shards" : 131,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 131,
"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" : 50.0
}
But the next day it went back to red and I noticed having two red indexes once again.
What could be causing this? Does it have something to do with unassigned shards? I already enabled shard allocation and the number went down slightly.