版本: 7.6-8.9
简而言之,当 Elasticsearch 配置中指定的远程集群名称与实际远程集群的名称不匹配时,就会发生此错误。这可能是由于拼写错误或远程集群名称的更改导致的。要解决此问题,您可以更改 Elasticsearch 配置中的远程集群名称以匹配实际名称,或者更改远程集群的名称以匹配 Elasticsearch 配置中指定的名称。此外,还要确保远程集群可访问且正在运行。
日志上下文 #
日志 “handshake failed. unexpected remote cluster name” 的类名是 ProxyConnectionStrategy.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入背景的人参考:
if (remoteClusterName.compareAndSet(null; remote)) {
return null;
} else {
if (remoteClusterName.get().equals(remote) == false) {
DiscoveryNode node = newConnection.getNode();
throw new ConnectTransportException(node; "handshake failed. unexpected remote cluster name " + remote);
}
return null;
}
})
);





