notes icon indicating copy to clipboard operation
notes copied to clipboard

java.lang.IllegalStateException: failure when sending a validation request to node

Open lanlin opened this issue 5 years ago • 2 comments

情景

elasticsearch 有节点无法加入集群,日志中出现如下关键信息

....
....
Caused by: java.lang.IllegalStateException: failure when sending a validation request to node
....
....
Caused by: org.elasticsearch.transport.RemoteTransportException: [node003][192.168.0.3:9300][internal:cluster/coordination/join/validate]
....
....
Caused by: org.elasticsearch.cluster.coordination.CoordinationStateRejectedException: join validation on cluster state with a different cluster uuid hkIOUFfhkUoanLhfalY than local cluster uuid dfgKLaoJFlaLjfaasfyIaOUFa, rejecting
....
....

处理方法

找到 elasticsearch.ymlpath.data 对应的数据存储目录,清空该目录,然后重启。

原因分析

该节点之前启动过,有历史数据存在,并且该数据与当前集群数据不一致。 从日志可以看出两者的集群 uuid 是不同的,因此需要清空旧数据,重启使该节点连入集群。

lanlin avatar May 29 '20 02:05 lanlin

为什么会出现uuid不一样。 怎么避免该问题

sagittar avatar Dec 26 '20 03:12 sagittar

@sagittar 额,原因分析说了啊。就是你不能连入的节点之前以其他不同的配置被启动过,并且残留有历史数据。现在你企图以新的配置连入新的 cluster, 但是历史数据还是上一个 cluster 的,所以会无法连入。就是你光改了配置,没有清空之前的残留数据造成的。

lanlin avatar Dec 28 '20 01:12 lanlin