elasticsearch
cluster_error
ai_generated
true
ClusterHealthResponse: status=RED, unassigned_shards=5, reason=ALLOCATION_FAILED
ID: elasticsearch/shard-allocation-failed
78%Fix Rate
85%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 8 | active | — | — | — |
Root Cause
Cluster red or yellow due to unassigned shards. Disk full, node left, or allocation filtering misconfigured.
genericWorkarounds
-
92% success Check allocation explain API for root cause
GET _cluster/allocation/explain?pretty # shows exactly why shard is unassigned
Sources: https://www.elastic.co/guide/en/elasticsearch/reference/current/
-
88% success Free disk space below watermark thresholds
Default watermarks: low=85%, high=90%, flood=95%. Free disk or adjust cluster.routing.allocation.disk.watermark settings
-
85% success Reroute with retry_failed to reattempt allocation after fixing root cause
POST _cluster/reroute?retry_failed=true # after resolving disk/node issues
Dead Ends
Common approaches that don't work:
-
Force-allocate primary shards with accept_data_loss
88% fail
Force allocation of stale primary shards risks losing acknowledged writes and creating split-brain data
-
Restart all nodes simultaneously to fix red cluster
82% fail
Simultaneous restart causes full cluster outage and risks data loss if quorum is lost