ElasticSearch: Unassigned Shards, how to fix?

前端 未结 24 1231
悲&欢浪女
悲&欢浪女 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-04 05:34

    I also encountered similar error. It happened to me because one of my data node was full and due to which shards allocation failed. If unassigned shards are there and your cluster is RED and few indices also RED, in that case I have followed below steps and these worked like a champ.
    in kibana dev tool-

    GET _cluster/allocation/explain
    

    If any unassigned shards are there then you will get details else will throw ERROR.

    simply running below command will solve everything-

    POST _cluster/reroute?retry_failed
    

    Thanks to -
    https://github.com/elastic/elasticsearch/issues/23199#issuecomment-280272888

提交回复
热议问题