Elasticsearch cluster indices shard status INITIALIZING
Elasticsearch cluster indices sharding status INITIALIZING, cluster status: yellow
Failure phenomenon GET / _ cat/shards/7a_cool7a_cool 5 r STARTED 4583018 759.4mb 10.2.4.21 pt01-pte-10-2-4-217a_cool 17 r INITIALIZING 10.2.4.22 pt01-pte-10-2-4-22 "= abnormal fragmentation solution 1: shut down the abnormal shard host es service Log in to pt01-pte-10-2-4-22 host, / etc/init.d/elasticsearch stop, and find that the fragments automatically migrate to other hosts, but the state is still in the initialization state, and the problem still exists. 2: specify shards for host migration POST / _ cluster/reroute {"commands": [{"move": {"index": "7a_cool", "shard": 17, "from_node": "pt01-pte-10-2-4-22" "to_node": "pt01-pte-10-2-4-25"} found error: error message is as follows: {"error": {"root_cause": [{"type": "illegal_argument_exception", "reason": "[move_allocation] can't move 17, shard is not started (state = INITIALIZING]"}] "type": "illegal_argument_exception", "reason": "[move_allocation] can't move 17, shard is not started (state = INITIALIZING]"}, "status": 400} the above information shows State = INITIALIZING, cannot be moved. 3: modify the number of shard replicas first change the number of indices replicas to 0 and then the cluster begins to adjust the cluster shards. After the adjustment, the cluster status changes to: greenPUT 7a_cool/_settings {"index": {"number_of_replicas": "0"}} and then modify the cluster indices status to 1PUT 7a_cool/_settings {"index": {"number_of_replicas": "1"}} the cluster will adjust the number of replicas again. After the adjustment, the cluster status is still: green, problem solved.