[Elasticsearch] 특정 shard가 assigned되지 않고 다른 shard들이 relocate를 반복하는 현상

2019. 8. 28. 11:02Elasticsearch

다른 클러스터로 인덱스를 백업하면서 특정 shard가 assigned되지 않고 다른 shard들이 relocate를 반복하는 현상이 발생

 

master node, 해당 data node 로그를 봐도 딱히 눈에 들어오는 명확한 원인 로그가 보이지 않고 ..

 

[failed to find metadata for existing index location] 정도 ..

 

일단 백업 작업을 중지시키고 해당 index를 close 후 다시 open 하는 방법으로 한번에 모든 shard들을 relocate 시키면서 문제는 해결되었지만 왜 이런 이슈가 종종 발생하는지는 아직 모르겠음

 

※ 추가 정보

  • cluster_block_exception - [FORBIDDEN/12/index read-only / allow delete (api)] 으로 인덱스 상태 변경 불가 시
# curl -XPUT -H "Content-Type: application/json" IP:PORT/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
  • 인덱스 close curl
# curl -XPOST 'IP:PORT/INDEX/_close'
  • 인덱스 open curl
# curl -XPOST 'IP:PORT/INDEX/_open'