欢迎投稿

今日深度:

elasticsearch 重启节点,elasticsearch节点

elasticsearch 重启节点,elasticsearch节点


由于修改配置等原因,elasticsearch需要重启节点,如果操作不当会造成整个集群崩溃,主要是因为elasticsearch有再平衡策略,就是当一个节点停机,整个集群就开始执行再平衡策略,集群开始移动分片,elasticsearch的健康状态不再是绿色。

 

可以通过集群API  关闭再平衡策略,再进行节点重启:

 

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

2,重启一个节点


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


重复上面的步骤,全部重启所有节点

 

www.htsjk.Com true http://www.htsjk.com/Elasticsearch/34091.html NewsArticle elasticsearch 重启节点,elasticsearch节点 由于修改配置等原因,elasticsearch需要重启节点,如果操作不当会造成整个集群崩溃,主要是因为elasticsearch有再平衡策略,就是当一个节点停机,整...
相关文章
    暂无相关文章
评论暂时关闭