elsticsearch问题之 报错with the same id but is a different node instance解决办法

记录一下在安装 elastic-search 单机多节点是时候报错解决方案。

[INFO ][o.e.d.z.ZenDiscovery     ] [slave-one] failed t
o send join request to master [{master}{-S9Jc4AYR-ODB8a8Wj5oCg}{cAR_0nC9RTSAdUcy
jnJjLg}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=8479907840, ml.max_open_job
s=20, xpack.installed=true, ml.enabled=true}], reason [RemoteTransportException[
[master][127.0.0.1:9300][internal:discovery/zen/join]]; nested: IllegalArgumentE
xception[can't add node {slave-one}{-S9Jc4AYR-ODB8a8Wj5oCg}{_r6Xx7QNRIev_hpn6mhd
ZQ}{127.0.0.1}{127.0.0.1:9301}{ml.machine_memory=8479907840, ml.max_open_jobs=20
, xpack.installed=true, ml.enabled=true}, found existing node {master}{-S9Jc4AYR
-ODB8a8Wj5oCg}{cAR_0nC9RTSAdUcyjnJjLg}{127.0.0.1}{127.0.0.1:9300}{ml.machine_mem
ory=8479907840, 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]; ]
  • 1

报错信息提示有相同的 id 但是是不同的实例。

原因是: 我把作为 master 的 elastic-search 文件复制了一份,导致数据也包含在了 作为 slave节点里面。

解决方案

参考解决方案:https://blog.csdn.net/qq_24879495/article/details/77718032
删除复制的作为 slave 节点的 elastic-search 的data 文件夹即可。

原文地址:https://www.cnblogs.com/sabertobih/p/13543952.html