📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-8.9

简要来说,当 Elasticsearch 节点尝试连接到另一个节点时失败,因为远程节点不属于预期的集群时,就会出现此错误。这可能是由于配置错误、网络问题或版本不兼容造成的。要解决此问题,请确保所有节点都有正确的集群名称,在同一网络上,并且运行兼容版本的 Elasticsearch。此外,检查防火墙设置以确保节点可以相互通信。

日志上下文 #

日志 “handshake failed. unexpected remote node” 的类名是 TransportService.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人使用:

return (newConnection; actualProfile; listener) -> {
 // We don't validate cluster names to allow for CCS connections.
 handshake(newConnection; actualProfile.getHandshakeTimeout(); cn -> true; listener.map(resp -> {
 final DiscoveryNode remote = resp.discoveryNode;
 if (node.equals(remote) == false) {
 throw new ConnectTransportException(node; "handshake failed. unexpected remote node " + remote);
 }
 return null;
 }));
 };
 };