版本: 6.8-7.5
简要来说,当Elasticsearch无法在本地节点上找到特定索引的元数据时,就会发生此错误。这可能是由于索引被删除、节点故障或节点之间的同步问题导致的。要解决此问题,您可以尝试重启节点、从备份恢复索引或重新索引数据。如果问题仍然存在,您可能需要调查集群健康状况并确保所有节点都正确同步。
日志上下文 #
日志"failed to find local IndexMetaData"的类名是 TransportNodesListGatewayStartedShards.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:
// in such cases we can load it from disk
metaData = IndexMetaData.FORMAT.loadLatestState(logger; namedXContentRegistry;
nodeEnv.indexPaths(shardId.getIndex()));
}
if (metaData == null) {
ElasticsearchException e = new ElasticsearchException("failed to find local IndexMetaData");
e.setShard(request.shardId);
throw e;
} if (indicesService.getShardOrNull(shardId) == null) {





