cluster_health_red: cluster health status: RED / unassigned shards
ElasticsearchWhat does it mean?
Cluster health RED means at least one primary shard is unassigned and unavailable. This is a critical state in which some data cannot be read/written, with a risk of partial data loss. (YELLOW means only replicas are unassigned; primaries are intact.)
Why does it happen?
A node crashed/left and the primary shards on it were left without a copy, allocation is blocked by the disk watermark, a corrupted shard, an error during snapshot restore, or allocation settings preventing shard assignment.
How to fix it
See why shards are unassigned: GET _cluster/allocation/explain or GET _cat/shards?v&h=index,shard,prirep,state,unassigned.reason. Bring crashed nodes back; if it is a disk problem, free up space (watermark). If allocation was blocked temporarily, trigger reallocation: POST _cluster/reroute?retry_failed=true. If a primary is completely lost, restore from a snapshot. In the RED state, focus on recovering primaries first.
More from this engine
- document_missing_exceptiondocument_missing_exception: [_doc][id]: document missing
- index_not_found_exceptionindex_not_found_exception: no such index [index_name] (HTTP 404)
- resource_already_exists_exceptionresource_already_exists_exception: index [index_name/uuid] already exists (HTTP 400)
- no_shard_available_action_exceptionno_shard_available_action_exception: No shard available for [...]
- es_rejected_execution_exceptiones_rejected_execution_exception: rejected execution of ... on ... (queue capacity ...) (HTTP 429)
- master_not_discovered_exceptionmaster_not_discovered_exception / MasterNotDiscoveredException
- security_exceptionsecurity_exception: unable to authenticate / action [...] is unauthorized for user [...] (HTTP 401/403)