ES报the same id but is a different node instance

ES启动报如下错误
[2018-10-06×××3:12:15,871][INFO ][o.e.d.z.ZenDiscovery ] [es3] failed to send join request to master [{es2}{B_JKs2_FT9KMjKElXz8Omg}{8IAmxXFTQ_isqHb3gMVC4g}{172.16.0.6}{172.16.0.6:9300}{ml.machine_memory=67556114432, ml.max_open_jobs=20, xpack.installed=true, ml.enabled=true}], reason [RemoteTransportException[[es2][172.16.0.6:9300][internal:discovery/zen/join]]; nested: IllegalArgumentException[can't add node {es3}{B_JKs2_FT9KMjKElXz8Omg}{h-×××KPTaT2mguJSzILXrjA}{172.16.0.22}{172.16.0.22:9300}{ml.machine_memory=67556106240, ml.max_open_jobs=20, xpack.installed=true, ml.enabled=true}, found existing node {es2}{B_JKs2_FT9KMjKElXz8Omg}{8IAmxXFTQ_isqHb3gMVC4g}{172.16.0.6}{172.16.0.6:9300}{ml.machine_memory=67556114432, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true} with the same id but is a different node instance]; ]

with the same id but is a different node instance
具有相同的id但是是不同的节点实例

原因:
在我部署ES集群第1个节点的的时候,我为了贪方便,直接从ES集群的第1个节点rsync ES目录到ES集群的第2个节点,于是在第2个节点启动服务的时候就会报如上错误,而之前在第1个节点的时候做测试已经产生了数据,所以再把这个数据拷过去就会报错连不上master

解决方法如下
删除第2个节点的nodes目录
rm -rf /data/elasticsearch/data/nodes/

注意
如果是已经加入集群的ES,在修改置完文件也报这个错的话,也需要删除这个节点数据文件然后再重启

猜你喜欢

转载自blog.51cto.com/yht1990/2294159