版本: 6.8-8.9
简而言之,当 Elasticsearch 无法找到本地集群状态时会发生此错误。这可能是由于节点丢失了数据路径、网络分区或主节点故障导致的。要解决此问题,您可以尝试重启节点、检查网络连接,或将另一个节点提升为主节点。如果怀疑数据丢失,请从快照恢复。此外,确保您的集群有足够的节点以防止单点故障也很重要。
日志上下文 #
日志"have no local cluster state"的类名是 PublicationTransportHandler.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
} else {
final ClusterState lastSeen = lastSeenClusterState.get();
if (lastSeen == null) {
logger.debug("received diff for but don't have any local cluster state - requesting full state");
incompatibleClusterStateDiffReceivedCount.incrementAndGet();
throw new IncompatibleClusterStateVersionException("have no local cluster state");
} else {
ClusterState incomingState;
try {
final Diffdiff;
final boolean includesLastCommittedData = request.version().onOrAfter(INCLUDES_LAST_COMMITTED_DATA_VERSION);





