📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-7.5

简而言之,当 Elasticsearch 无法找到指定索引的分片路径时,就会出现此错误。这可能是由于分片被删除、移动或损坏造成的。要解决此问题,您可以尝试从备份恢复分片,检查文件系统是否存在任何问题,或者如果数据不关键,则重新创建索引。如果分片已损坏,您可能需要使用 Elasticsearch 修复工具来修复它。

日志上下文 #

日志"Unable to resolve shard path for index [" + indexName + “] and shard id [” + shardId + “]“的类名是 RemoveCorruptedShardDataCommand.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:

} catch (LockObtainFailedException lofe) {
    throw new ElasticsearchException("Failed to lock node's directory [" + lofe.getMessage()
        + " ]; is Elasticsearch still running ?");
}
}
throw new ElasticsearchException("Unable to resolve shard path for index [" + indexName + "] and shard id [" + shardId + "]");
}

public static boolean isCorruptMarkerFileIsPresent(final Directory directory) throws IOException {
    boolean found = false;