resource_already_exists_exception: resource_already_exists_exception: index [index_name/uuid] already exists (HTTP 400)
Elasticsearch의미
생성하려는 인덱스(또는 리소스)가 이미 존재한다. 같은 이름의 인덱스가 있어 생성 요청이 거부되었다. 이전 버전에서는 index_already_exists_exception으로도 나타난다.
원인
같은 인덱스를 두 번 생성하려 함, 멱등하지 않은 설정 스크립트, 동시 생성 요청, 또는 같은 이름을 다른 설정으로 다시 생성하려는 시도.
해결 방법
인덱스가 이미 존재한다면 생성할 필요 없이 계속 진행한다. 다시 생성해야 한다면 먼저 삭제(DELETE /index-name)한 뒤 생성한다(주의: 데이터 손실). 설정 스크립트를 멱등하게 만든다: 먼저 GET _cat/indices로 존재 여부를 확인한다. 스키마 관리에 index template이나 ILM/rollover를 사용해 충돌을 방지한다.
같은 데이터베이스의 다른 항목
- version_conflict_engine_exceptionversion_conflict_engine_exception: [_doc][id]: version conflict, current version [x] is different than the one provided [y] (HTTP 409)
- document_missing_exceptiondocument_missing_exception: [_doc][id]: document missing
- index_not_found_exceptionindex_not_found_exception: no such index [index_name] (HTTP 404)
- cluster_health_redcluster health status: RED / unassigned shards (클러스터 상태 RED / 미할당 샤드)
- 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