Failed to find index as current cluster state with version – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.6-7.15

Briefly, this error occurs when Elasticsearch is unable to locate an index in the current cluster state with the specified version. This could be due to the index being deleted, renamed, or not yet created. To resolve this issue, you can verify the existence and name of the index, ensure the index is properly created before it’s accessed, or check if the index was accidentally deleted. If the index was renamed, update the reference to the new name.

This guide will help you check for common problems that cause the log ” failed to find index as current cluster state with version [ ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: replication, index, version, cluster.

Log Context

Log “failed to find index as current cluster state with version [” class name is TransportReplicationAction.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 // 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()));

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?