版本: 7.6-8.9
简要来说,当Elasticsearch集群中的某个节点没有特定索引的必要元数据时,就会出现此错误。这可能是由于集群内部的同步问题或索引创建失败导致的。要解决此问题,你可以尝试重新索引数据,确保所有节点都正确同步,或者检查集群的健康状况并修复发现的任何问题。如果问题持续存在,考虑重启Elasticsearch节点或整个集群,但在执行此操作之前请确保你有正确的数据备份。
日志上下文 #
日志"node doesn’t have meta data for index"(节点没有索引的元数据)的类名是 TransportNodesListShardStoreMetadata.java。 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:
IndexMetadata metadata = clusterService.state().metadata().index(shardId.getIndex());
if (metadata != null) {
customDataPath = new IndexSettings(metadata; settings).customDataPath();
} else {
logger.trace("{} node doesn't have meta data for the requests index"; shardId);
throw new ElasticsearchException("node doesn't have meta data for index " + shardId.getIndex());
}
}
}
final ShardPath shardPath = ShardPath.loadShardPath(logger; nodeEnv; shardId; customDataPath);
if (shardPath == null) {





