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

版本: 7.6-7.15

简而言之,当Elasticsearch无法在当前集群状态下找到具有指定版本的索引时,就会发生此错误。这可能是由于索引被删除、重命名或尚未创建造成的。要解决此问题,您可以验证索引的存在性和名称,确保在访问索引之前正确创建索引,或者检查索引是否被意外删除。如果索引被重命名,请更新对新名称的引用。

日志上下文 #

日志"failed to find index as current cluster state with version [“的类名是 TransportReplicationAction.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:

// ensure that the cluster state on the node is at least as high as the node that decided that the index was there
if (state.version() < request.routedBasedOnClusterVersion()) {
    logger.trace("failed to find index [{}] for request [{}] despite sender thinking it would be here. " +
        "Local cluster state version [{}]] is older than on sending node (version [{}]); scheduling a retry...";
        request.shardId().getIndex(); request; state.version(); request.routedBasedOnClusterVersion());
    retry(new IndexNotFoundException("failed to find index as current cluster state with version [" + state.version() +
        "] is stale (expected at least [" + request.routedBasedOnClusterVersion() + "]";
        request.shardId().getIndexName()));
    return;
} else {
    finishAsFailed(new IndexNotFoundException(request.shardId().getIndex()));