Found shard on path with a different index UUID – this – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.15

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

Briefly, this error occurs when Elasticsearch identifies a shard on a path that has a different index UUID. This usually happens when there’s a mismatch between the index UUID in the cluster state and the one on the disk. To resolve this issue, you can try the following: 1) Delete the mismatched index and recreate it. 2) Restore the index from a snapshot if available. 3) If the data is not important, you can delete the data directory of the node, but this will remove all data on that node.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” {} found shard on path: [{}] with a different index UUID – this ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, shard.

Log Context

Log “{} found shard on path: [{}] with a different index UUID – this ” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        for (Path path : availableShardPaths) {
            // EMPTY is safe here because we never call namedObject
            ShardStateMetadata load = ShardStateMetadata.FORMAT.loadLatestState(logger; NamedXContentRegistry.EMPTY; path);
            if (load != null) {
                if (load.indexUUID.equals(indexUUID) == false && IndexMetadata.INDEX_UUID_NA_VALUE.equals(load.indexUUID) == false) {
                    logger.warn("{} found shard on path: [{}] with a different index UUID - this "
                        + "shard seems to be leftover from a different index with the same name. "
                        + "Remove the leftover shard in order to reuse the path with the current index"; shardId; path);
                    throw new IllegalStateException(shardId + " index UUID in shard state was: " + load.indexUUID
                        + " expected: " + indexUUID + " on shard path: " + path);


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?

Get expert answers on Elasticsearch/OpenSearch