Failed to create snapshot successfully failures out of total shards failed – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.8-7.12

Briefly, this error occurs when Elasticsearch is unable to create a snapshot due to failures in some of the shards. This could be due to insufficient disk space, network connectivity issues, or problems with the underlying file system. To resolve this issue, you can try the following: 1) Ensure there is enough disk space available for the snapshot. 2) Check the network connectivity between the Elasticsearch nodes and the snapshot repository. 3) Verify the health of the file system where the snapshot repository is located. 4) Check the Elasticsearch logs for more detailed error messages.

This guide will help you check for common problems that cause the log ” failed to create snapshot successfully; {} failures out of {} total shards failed ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: snapshot, shards, plugin.

Log Context

Log “failed to create snapshot successfully; {} failures out of {} total shards failed” classname is CreateSnapshotStep.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                if (snapInfo.failedShards() == 0) {
                    listener.onResponse(true);
                } else {
                    int failures = snapInfo.failedShards();
                    int total = snapInfo.totalShards();
                    logger.warn("failed to create snapshot successfully; {} failures  out of {} total shards failed"; failures; total);
                    listener.onResponse(false);
                }
            }; listener::onFailure));
    }
}

 

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?