shard_not_found_exception: Shard not found
Elasticsearch의미
대상 샤드를 찾을 수 없다. Elasticsearch가 지정한 인덱스의 해당 샤드에 도달할 수 없어 요청을 완료하지 못했다.
원인
샤드가 아직 할당되지 않았거나(unassigned) 복구 중이거나, 노드가 클러스터를 떠나 샤드가 일시적으로 없거나, 샤드로 직접 라우팅된 저수준 요청이 더 이상 유효하지 않은 라우팅 정보를 가지고 있는 경우다. 클러스터 상태가 저하되었을 때 나타난다.
해결 방법
클러스터와 샤드 상태 확인: GET _cluster/health 및 GET _cat/shards?v. 샤드가 할당되지 않은 이유 확인: GET _cluster/allocation/explain. 노드가 유실되었다면 복구하고 디스크/할당 설정(watermark)을 검토한다. 복구가 진행 중이면 완료될 때까지 기다린다. 단일 노드가 유실되어도 데이터를 사용할 수 있도록 충분한 replica 수를 유지한다.
같은 데이터베이스의 다른 항목
- snapshot_missing_exceptionSnapshot is missing
- index_template_missing_exceptionIndex template is missing
- settings_exceptionInvalid settings
- not_x_content_exceptionCompressor detection error / body is not valid content (압축 감지 오류 / 본문이 유효한 콘텐츠가 아님)
- document_source_missing_exceptionDocument source is missing
- node_not_connected_exceptionNode is not connected
- receive_timeout_transport_exceptionRequest timed out waiting for a response from another node (다른 노드의 응답 대기 중 요청 타임아웃)