I am new to Elasticsearch and was trying to use Fleet and Elastic Agent. It was fine initially as everything was working perfectly fine; managed to pipe logs to ES, etc, but now when I try to navigate to the Fleet page, I get this error: -
Unable to initialize central management for Elastic Agents
search_phase_execution_exception: [no_shard_available_action_exception] Reason: null
I ran this command - GET _cat/shards?v=true&h=index,shard,prirep,state,node,unassigned.reason&s=state
Result:
index shard prirep state node unassigned.reason
.ds-.fleet-actions-results-2022.05.24-000001 0 r UNASSIGNED CLUSTER_RECOVERED
.fleet-policies-leader-7 0 p UNASSIGNED ALLOCATION_FAILED
.fleet-servers-7 0 p UNASSIGNED ALLOCATION_FAILED
.ds-.fleet-actions-results-2022.06.25-000002 0 r UNASSIGNED CLUSTER_RECOVERED
.fleet-actions-7 0 p STARTED node-1
.ds-logs-windows.powershell-default-2022.05.24-000001 0 p STARTED node-1
.ds-metrics-windows.perfmon-default-2022.05.24-000001 0 p STARTED node-1
.metrics-endpoint.metadata_united_default 0 p STARTED node-1
.kibana-event-log-7.17.3-000001 0 p STARTED node-1
.kibana_7.17.3_001 0 p STARTED node-1
.ds-metrics-elastic_agent.filebeat-default-2022.05.24-000001 0 p STARTED node-1
.transform-internal-007 0 p STARTED node-1
.lists-default-000001 0 p STARTED node-1
.ds-logs-elastic_agent-default-2022.06.25-000002 0 p STARTED node-1
.ds-.logs-deprecation.elasticsearch-default-2022.06.21-000002 0 p STARTED node-1
.ds-logs-windows.powershell-default-2022.06.25-000002 0 p STARTED node-1
.ds-metrics-elastic_agent.elastic_agent-default-2022.05.24-000001 0 p STARTED node-1
.kibana_task_manager_7.17.3_001 0 p STARTED node-1
.apm-agent-configuration 0 p STARTED node-1
.ds-.logs-deprecation.elasticsearch-default-2022.05.22-000001 0 p STARTED node-1
metrics-endpoint.metadata_current_default 0 p STARTED node-1
.ds-metrics-elastic_agent.filebeat-default-2022.06.25-000002 0 p STARTED node-1
.ds-metrics-windows.service-default-2022.06.25-000002 0 p STARTED node-1
.fleet-enrollment-api-keys-7 0 p STARTED node-1
.ds-logs-elastic_agent.fleet_server-default-2022.06.25-000002 0 p STARTED node-1
.ds-logs-elastic_agent.metricbeat-default-2022.06.25-000002 0 p STARTED node-1
.fleet-agents-7 0 p STARTED node-1
logstash-2022.05.22-000001 0 p STARTED node-1
.ds-metrics-windows.perfmon-default-2022.06.25-000002 0 p STARTED node-1
.ds-metrics-elastic_agent.fleet_server-default-2022.06.25-000002 0 p STARTED node-1
.ds-winlogbeat-8.2.0-2022.05.23-000001 0 p STARTED node-1
.ds-metrics-elastic_agent.metricbeat-default-2022.05.24-000001 0 p STARTED node-1
.apm-custom-link 0 p STARTED node-1
.ds-metrics-elastic_agent.elastic_agent-default-2022.06.25-000002 0 p STARTED node-1
.ds-winlogbeat-8.2.0-2022.06.22-000002 0 p STARTED node-1
.async-search 0 p STARTED node-1
.security-7 0 p STARTED node-1
sigma-index 0 p STARTED node-1
.ds-.fleet-actions-results-2022.05.24-000001 0 p STARTED node-1
.ds-metrics-elastic_agent.metricbeat-default-2022.06.25-000002 0 p STARTED node-1
.ds-logs-elastic_agent.metricbeat-default-2022.05.24-000001 0 p STARTED node-1
.ds-metrics-windows.service-default-2022.05.24-000001 0 p STARTED node-1
.ds-logs-windows.powershell_operational-default-2022.05.30-000001 0 p STARTED node-1
.kibana_security_session_1 0 p STARTED node-1
.tasks 0 p STARTED node-1
.geoip_databases 0 p STARTED node-1
.ds-logs-elastic_agent.filebeat-default-2022.06.25-000002 0 p STARTED node-1
.ds-ilm-history-5-2022.06.21-000002 0 p STARTED node-1
.transform-notifications-000002 0 p STARTED node-1
.kibana-event-log-7.17.3-000002 0 p STARTED node-1
.ds-ilm-history-5-2022.05.22-000001 0 p STARTED node-1
.ds-.fleet-actions-results-2022.06.25-000002 0 p STARTED node-1
.ds-logs-windows.sysmon_operational-default-2022.05.31-000001 0 p STARTED node-1
logstash-2022.06.21-000002 0 p STARTED node-1
.items-default-000001 0 p STARTED node-1
.ds-logs-elastic_agent-default-2022.05.24-000001 0 p STARTED node-1
.ds-logs-elastic_agent.filebeat-default-2022.05.24-000001 0 p STARTED node-1
.fleet-policies-7 0 p STARTED node-1
.ds-logs-elastic_agent.fleet_server-default-2022.05.24-000001 0 p STARTED node-1
.ds-metrics-elastic_agent.fleet_server-default-2022.05.24-000001 0 p STARTED node-1
.siem-signals-default-000001 0 p STARTED node-1
and also ran this -
GET _cluster/allocation/explain
{
"index": ".fleet-servers-7",
"shard": 0,
"primary": true
}
Result:
{
"index" : ".fleet-servers-7",
"shard" : 0,
"primary" : true,
"current_state" : "unassigned",
"unassigned_info" : {
"reason" : "ALLOCATION_FAILED",
"at" : "2022-06-27T11:11:28.248Z",
"failed_allocation_attempts" : 5,
"details" : "failed shard on node [GF2tTENwT8S7UiAEPK0WaQ]: shard failure, reason [failed to recover from translog], failure EngineException[failed to recover from translog]; nested: TranslogCorruptedException[translog from source [/var/lib/elasticsearch/nodes/0/indices/HI5E9uMpTL6FCuwtkERw-A/0/translog/translog-13.tlog] is corrupted, operation size must be at least 4 but was: 0]; ",
"last_allocation_status" : "no"
},
"can_allocate" : "yes",
"allocate_explanation" : "can allocate the shard",
"target_node" : {
"id" : "GF2tTENwT8S7UiAEPK0WaQ",
"name" : "node-1",
"transport_address" : "x.x.x.x:9300",
"attributes" : {
"ml.machine_memory" : "8312123392",
"xpack.installed" : "true",
"transform.node" : "true",
"ml.max_open_jobs" : "512",
"ml.max_jvm_size" : "4294967296"
}
},
"allocation_id" : "7ERQMHPRRnCg9FUR8-d5ew",
"node_allocation_decisions" : [
{
"node_id" : "GF2tTENwT8S7UiAEPK0WaQ",
"node_name" : "node-1",
"transport_address" : "x.x.x.x:9300",
"node_attributes" : {
"ml.machine_memory" : "8312123392",
"xpack.installed" : "true",
"transform.node" : "true",
"ml.max_open_jobs" : "512",
"ml.max_jvm_size" : "4294967296"
},
"node_decision" : "yes",
"store" : {
"in_sync" : true,
"allocation_id" : "7ERQMHPRRnCg9FUR8-d5ew"
}
}
]
}
I seem to not be able to rectify this issue since I am pretty new, I am not sure what settings to change and where. Hope someone is able to help. Thank you!