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]; ]node
with the same id but is a different node instance 具备相同的id可是是不一样的节点实例
缘由:
在我部署ES集群第1个节点的的时候,我为了贪方便,直接从ES集群的第1个节点rsync ES目录到ES集群的第2个节点,因而在第2个节点启动服务的时候就会报如上错误,而以前在第1个节点的时候作测试已经产生了数据,因此再把这个数据拷过去就会报错连不上masterelasticsearch
解决方法以下
删除第2个节点的nodes目录rm -rf /data/elasticsearch/data/nodes/
ide
注意
若是是已经加入集群的ES,在修改置完文件也报这个错的话,也须要删除这个节点数据文件而后再重启测试