Snapshot lifecycle policy or policies not found – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.4-7.15

Briefly, this error occurs when Elasticsearch cannot find the specified snapshot lifecycle policy or policies. This could be due to the policy being deleted, not yet created, or a typo in the policy name. To resolve this issue, you can verify the existence of the policy by using the GET lifecycle policy API. If it doesn’t exist, create a new policy using the PUT lifecycle policy API. If it’s a typo, correct the policy name in your request.

This guide will help you check for common problems that cause the log ” snapshot lifecycle policy or policies {} not found ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, snapshot.

Log Context

Log “snapshot lifecycle policy or policies {} not found” class name is TransportGetSnapshotLifecycleAction.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 .collect(Collectors.toList());
 if (lifecycles.size() == 0) {
 if (request.getLifecycleIds().length == 0) {
 listener.onResponse(new GetSnapshotLifecycleAction.Response(Collections.emptyList()));
 } else {
 listener.onFailure(new ResourceNotFoundException("snapshot lifecycle policy or policies {} not found";
 Arrays.toString(request.getLifecycleIds())));
 }
 } else {
 listener.onResponse(new GetSnapshotLifecycleAction.Response(lifecycles));
 }

 

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?