版本: 7-7.15
简而言之,当 Elasticsearch 集群中的某个节点从非主节点的节点接收到集群状态时,就会发生此错误。这可能是由于网络问题,或者主节点暂时不可用造成的。要解决此问题,您可以检查节点之间的网络连接,确保主节点正常运行,或者如果网络较慢,考虑增加 ‘discovery.zen.ping.unicast.hosts’ 超时时间。此外,还要检查集群健康状况,确保所有节点都正确连接到主节点。
日志上下文 #
日志 “received cluster state from” 的类名是 Coordinator.java。 我们从 Elasticsearch 源代码中提取了以下内容,以便为那些需要深入上下文的人提供参考:
if (localState.metadata().clusterUUIDCommitted() &&
localState.metadata().clusterUUID().equals(publishRequest.getAcceptedState().metadata().clusterUUID()) == false) {
logger.warn("received cluster state from {} with a different cluster uuid {} than local cluster uuid {}; rejecting";
sourceNode; publishRequest.getAcceptedState().metadata().clusterUUID(); localState.metadata().clusterUUID());
throw new CoordinationStateRejectedException("received cluster state from " + sourceNode +
" with a different cluster uuid " + publishRequest.getAcceptedState().metadata().clusterUUID() +
" than local cluster uuid " + localState.metadata().clusterUUID() + "; rejecting");
} if (publishRequest.getAcceptedState().term() > localState.term()) {





