Waiting to stop ILM because index with policy is currently in step – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.15

Briefly, this error occurs when Elasticsearch is trying to stop the Index Lifecycle Management (ILM) but can’t because an index with a policy is currently in a step. This means that an index is in the middle of a lifecycle operation. To resolve this issue, you can either wait for the operation to complete or manually move the index to the next step using the Move to step API. Alternatively, you can remove the lifecycle policy from the index, stop the ILM, and then reapply the policy.

This guide will help you check for common problems that cause the log ” waiting to stop ILM because index [{}] with policy [{}] is currently in step [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, plugin.

Log Context

Log “waiting to stop ILM because index [{}] with policy [{}] is currently in step [{}]” classname is IndexLifecycleService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                    StepKey stepKey = LifecycleExecutionState.getCurrentStepKey(lifecycleState);

                    try {
                        if (OperationMode.STOPPING == currentMode) {
                            if (stepKey != null && IGNORE_STEPS_MAINTENANCE_REQUESTED.contains(stepKey.getName())) {
                                logger.info("waiting to stop ILM because index [{}] with policy [{}] is currently in step [{}]";
                                    idxMeta.getIndex().getName(); policyName; stepKey.getName());
                                lifecycleRunner.maybeRunAsyncAction(clusterState; idxMeta; policyName; stepKey);
                                // ILM is trying to stop; but this index is in a Shrink step (or other dangerous step) so we can't stop
                                safeToStop = false;
                            } else {

 

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?