cluster_health_red: cluster health status: RED / unassigned shards (클러스터 상태 RED / 미할당 샤드)
Elasticsearch의미
클러스터 상태 RED는 최소 하나의 primary 샤드가 미할당되어 사용할 수 없음을 의미한다. 일부 데이터를 읽거나 쓸 수 없는 심각한 상태로, 부분적 데이터 손실 위험이 있다. (YELLOW는 replica만 미할당이며 primary는 정상이다.)
원인
노드가 크래시/이탈해 그 노드의 primary 샤드에 사본이 남지 않음, 디스크 watermark로 할당이 차단됨, 손상된 샤드, 스냅샷 복원 중 오류, 또는 샤드 할당을 막는 allocation 설정.
해결 방법
샤드가 미할당된 이유를 확인한다: GET _cluster/allocation/explain 또는 GET _cat/shards?v&h=index,샤드,prirep,state,unassigned.reason. 크래시된 노드를 복구하고, 디스크 문제라면 공간을 확보한다(watermark). 할당이 일시적으로 차단되었다면 재할당을 트리거한다: POST _cluster/reroute?retry_failed=true. primary가 완전히 유실되었다면 스냅샷에서 복원한다. RED 상태에서는 primary 복구에 먼저 집중한다.
같은 데이터베이스의 다른 항목
- 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)