Infra & Devops/ElasticSearch
[ElasticSearch] node does not match index setting [index.routing.allocation.require] filters [box_type:\"hot\"]
겸둥이xz
2023. 3. 9. 00:43
반응형
UNASSIGNED 상태인 shard의 원인을 explain API를 사용하여 확인할 수 있다.
# explain API
curl -XGET "localhost:9200/_cluster/allocation/explain?pretty"
"node does not match index setting [index.routing.allocation.require] filters [box_type:\"hot\"]"
box_type 설정이 잘 못된 경우이다.
hot-warm 구조를 사용하지 않지만, 잘못된 template 설정으로 인하여 box_type: hot 으로 설정된 경우가 있다.
문제가 있는 인덱스의 "index.routing.allocation.require.box_type": null 으로 설정하여 일시적으로 해결 가능하다.
curl -XPUT -H 'Content-Type: application/json' -d '{"settings" : { "index.routing.allocation.require.box_type": null } }' "localhost:9200/${INDEX}/_settings"
하지만 template이 잘못 설정된 경우에는 일시적인 방법이므로 template을 수정하여 색인을 진행해야한다.
반응형