Shard state info found but indexUUID didn t match expected actual – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when the unique identifier (UUID) of an Elasticsearch index doesn’t match the expected UUID. This could be due to a corruption in the index or a failed recovery process. To resolve this issue, you can try to restore the index from a backup, or delete and recreate the index. If the problem persists, you may need to restart the Elasticsearch node or cluster to refresh the state information.

This guide will help you check for common problems that cause the log ” {} shard state info found but indexUUID didn’t match expected [{}] actual [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index and shards.

Log Context

Log “{} shard state info found but indexUUID didn’t match expected [{}] actual [{}]” classname is TransportNodesListGatewayStartedShards.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                 }
                // old shard metadata doesn't have the actual index UUID so we need to check if the actual uuid in the metadata
                // is equal to IndexMetaData.INDEX_UUID_NA_VALUE otherwise this shard doesn't belong to the requested index.
                if (indexUUID.equals(shardStateMetaData.indexUUID) == false
                        && IndexMetaData.INDEX_UUID_NA_VALUE.equals(shardStateMetaData.indexUUID) == false) {
                    logger.warn("{} shard state info found but indexUUID didn't match expected [{}] actual [{}]"; shardId; indexUUID; shardStateMetaData.indexUUID);
                } else {
                    logger.debug("{} shard state info found: [{}]"; shardId; shardStateMetaData);
                    return new NodeGatewayStartedShards(clusterService.localNode(); shardStateMetaData.version);
                }
            }




 

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?