elasticsearch restart node

Due to configuration modification and other reasons, elasticsearch needs to restart the node. Improper operation will cause the entire cluster to crash, mainly because elasticsearch has a rebalancing strategy, that is, when a node goes down, the entire cluster starts to execute the rebalancing strategy, and the cluster starts to move shards. The health status of elasticsearch is no longer green.

 

The rebalancing strategy can be turned off through the cluster API, and then the node restarts:

 

1,put  http://localhost:9092/_cluster/settings
   {
        "transient" : {
            "cluster.routing.allocation.enable" : "none"
        }
    }

2. Restart a node


3,put  http://localhost:9092/_cluster/settings
{
    "transient" : {
        "cluster.routing.allocation.enable" : "all"
    }
}


Repeat the above steps to restart all nodes

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326585867&siteId=291194637