Lifecycle policy not found – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch cannot find the specified lifecycle policy. Lifecycle policies are used to manage how your data is stored and when it’s deleted. This error could be due to a typo in the policy name, or the policy may not have been created yet. To resolve this issue, you can check the policy name for typos, or create the lifecycle policy if it doesn’t exist. Also, ensure that the policy is in the correct cluster if you’re using multiple clusters.

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

Log Context

Log “Lifecycle policy not found: {}” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 ClusterState.Builder newState = ClusterState.builder(currentState);
 IndexLifecycleMetadata currentMetadata = currentState.metadata().custom(IndexLifecycleMetadata.TYPE);
 if (currentMetadata == null || currentMetadata.getPolicyMetadatas().containsKey(request.getPolicyName()) == false) {
 throw new ResourceNotFoundException("Lifecycle policy not found: {}"; request.getPolicyName());
 SortedMap newPolicies = new TreeMap<>(currentMetadata.getPolicyMetadatas());
 IndexLifecycleMetadata newMetadata = new IndexLifecycleMetadata(newPolicies; currentILMMode(currentState));
 newState.metadata(Metadata.builder(currentState.getMetadata()).putCustom(IndexLifecycleMetadata.TYPE; newMetadata).build());


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?