ElasticSearch: Unassigned Shards, how to fix?

前端 未结 24 1056
悲&欢浪女
悲&欢浪女 2020-12-04 05:03

I have an ES cluster with 4 nodes:

number_of_replicas: 1
search01 - master: false, data: false
search02 - master: true, data: true
search03 - master: false,          


        
24条回答
  •  有刺的猬
    2020-12-04 05:29

    I was having this issue as well, and I found an easy way to resolve it.

    • Get the index of unassigned shards

      $ curl -XGET http://172.16.4.140:9200/_cat/shards
      
    • Install curator Tools, and use it to delete index

      $ curator --host 172.16.4.140 delete indices --older-than 1 \
             --timestring '%Y.%m.%d' --time-unit days --prefix logstash
      

      NOTE: In my case, the index is logstash of the day 2016-04-21

    • Then check the shards again, all the unassigned shards go away!

提交回复
热议问题