SLM retention snapshot cleanup task completed with error – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.7-8.9

Briefly, this error occurs when Elasticsearch’s Snapshot Lifecycle Management (SLM) tries to clean up old snapshots but encounters an issue. This could be due to insufficient permissions, network issues, or problems with the snapshot repository. To resolve this, you can check the Elasticsearch logs for more details about the error. Ensure that the Elasticsearch cluster has the necessary permissions to delete snapshots. Also, verify the health and connectivity of the snapshot repository. If the repository is on a remote server, ensure it’s accessible and has enough space.

This guide will help you check for common problems that cause the log ” SLM retention snapshot cleanup task completed with error ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, task, snapshot.

Log Context

Log “SLM retention snapshot cleanup task completed with error” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            try {
                logger.error("error during snapshot retention task"; e);
            } finally {
      "SLM retention snapshot cleanup task completed with error");

        try {
  "starting SLM retention snapshot cleanup task");


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?