Elasticsearch节点角色切换,从data节点转变为master报错

由于在刚搭建es集群的时候,资源不足,所以master节点和data节点是没有拆分开的。经常造成master节点的load非常高,现在由于资源充足了,所以开始对节点角色进行改造。

  1. 首先把节点上面的数据驱逐到别的节点上面,这个用 es-api 即可
    PUT _cluster/settings
    {
     "transient" : {
     "cluster.routing.allocation.exclude._ip" : "172.18.1.1,172.18.1.2,172.18.1.3"
     }
    }
    
  2. 然后修改 elastisearch.yml 的配置文件
    node.master: true
    node.data: false
    node.ingest: true
    search.remote.connect: false
    
  3. 还原对集群的设置,虽然这不影响,但是最好还是还原一下
    PUT _cluster/settings
    {
     "transient" : {
     "cluster.routing.allocation.exclude._ip" : ""
     }
    }
    

在重启的过程中,遇到以下报错:

[2020-07-10T19:16:49,211][ERROR][o.e.b.Bootstrap          ] [node-141.56] Exception
java.lang.IllegalStateException: Node is started with node.data=false, but has shard data: [/tol/es-data/es742-prome/nodes/0/indices/wxAOP9NpRYiJ2SXujvEUBg/4, /tol/es-da
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值