I have a server with ELK
along with heartbeat
installed. (all are v6.4.2
)
Heartbeat is monitoring two other servers' elasticsearch
and logstash
with its pipeline in same domain
from current server.
It is creating index like heartbeat-6.4.2-<date>
everyday. I created dashboard for those two servers and was working as expected.
It was working fine until 12th Oct.
Yesterday I tried to see the dashboard for last 24 hrs and its giving me the following error.
10 of 62 Shards failed
Then I tried to check the health of my Elasticsearch:
// 20191017122950
// http://<hostname>:9202/_cluster/health
{
"cluster_name": "elasticsearch",
"status": "yellow",
"timed_out": false,
"number_of_nodes": 1,
"number_of_data_nodes": 1,
"active_primary_shards": 195,
"active_shards": 195,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 194,
"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.128534704370175
}
Unassigned Shards count is 194
I don't know the exact reason and started digging deeper.
curl -XGET http://hostname:9202/_cluster/allocation/explain?pretty
{
"index" : "mdcp-logs-2019.09.28",
"shard" : 2,
"primary" : false,
"current_state" : "unassigned",
"unassigned_info" : {
"reason" : "CLUSTER_RECOVERED",
"at" : "2019-10-01T11:30:03.909Z",
"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" : "Bewr4jriQziexcfUXZSfdg",
"node_name" : "Bewr4jr",
"transport_address" : "ip:9300",
"node_attributes" : {
"ml.machine_memory" : "67368890368",
"xpack.installed" : "true",
"ml.max_open_jobs" : "20",
"ml.enabled" : "true"
},
"node_decision" : "no",
"deciders" : [
{
"decider" : "same_shard",
"decision" : "NO",
"explanation" : "the shard cannot be allocated to the same node on which a copy of the shard already exists [[mdcp-logs-2019.09.28][2], node[Bewr4jriQziexcfUXZSfdg], [P], s[STARTED], a[id=SbtMhgHzTMCQv6yEGcwV8Q]]"
}
]
}
]
}
I can see the current data in Discover
tab but not storing in index and so dashboard is not working.
Any solution or workaround for this?