版本: 6.8-8.9
简而言之,当 Elasticsearch 无法找到分片的元数据时,会出现此错误。这可能是由于索引损坏或节点恢复失败导致的。要解决此问题,如果有可用的快照,可以尝试从快照恢复索引。如果没有,您可能需要删除并重新创建索引。如果错误仍然存在,建议检查节点的健康状况,确保它们之间正常通信。
日志上下文 #
日志"No shard state meta data at"的类名是 RemoveCorruptedShardDataCommand.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入背景的人参考:
namedXContentRegistry;
shardStatePath
);
if (shardStateMetadata == null) {
throw new ElasticsearchException("No shard state meta data at " + shardStatePath);
}
final AllocationId newAllocationId = AllocationId.newInitializing();
terminal.println("Changing allocation id " + shardStateMetadata.allocationId.getId() + " to " + newAllocationId.getId());





