版本: 7-8
简要来说,当 Elasticsearch 集群中的某个节点不具备成为 master 节点的资格时,会出现此错误。这可能是由于配置设置不正确导致的。要解决此问题,你可以检查 elasticsearch.yml 文件中的节点配置。确保 ‘node.master’ 设置为 true。如果问题仍然存在,建议检查集群的健康状况和网络连接。此外,确保集群有足够的 master-eligible 节点以防止脑裂场景。
日志上下文 #
日志 “non-master-eligible node found” 类名是 HandshakingTransportAddressConnector.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
IOUtils.closeWhileHandlingException(connection); if (remoteNode.equals(transportService.getLocalNode())) {
listener.onFailure(new ConnectTransportException(remoteNode; "local node found"));
} else if (remoteNode.isMasterNode() == false) {
listener.onFailure(new ConnectTransportException(remoteNode; "non-master-eligible node found"));
} else {
transportService.connectToNode(remoteNode; new ActionListener<>() {
@Override
public void onResponse(Releasable connectionReleasable) {
logger.trace("[{}] completed full connection with [{}]"; thisConnectionAttempt; remoteNode);





