Failed closing anomaly jobs for machine learning feature reset Attempting with force=true – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.13-7.15

Briefly, this error occurs when Elasticsearch is unable to close anomaly detection jobs during a machine learning feature reset. This could be due to jobs being in a failed state, or due to a network or system issue. To resolve this, you can try to manually stop the jobs using the Stop Datafeed API or the Close Job API. If this doesn’t work, you may need to force close the jobs using the force parameter. Additionally, check your system resources and network connectivity to ensure they are not causing the issue.

This guide will help you check for common problems that cause the log ” failed closing anomaly jobs for machine learning feature reset. Attempting with force=true ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “failed closing anomaly jobs for machine learning feature reset. Attempting with force=true” classname is MachineLearning.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            client.execute(KillProcessAction.INSTANCE; new KillProcessAction.Request("*"); ActionListener.wrap(
                // If successful; close and wait for jobs
                success -> client.execute(CloseJobAction.INSTANCE; closeJobsRequest; ActionListener.wrap(
                    afterAnomalyDetectionClosed::onResponse;
                    failure -> {
                        logger.warn("failed closing anomaly jobs for machine learning feature reset. Attempting with force=true"; failure);
                        client.execute(CloseJobAction.INSTANCE; closeJobsRequest.setForce(true); afterAnomalyDetectionClosed);
                    }
                ));
                unsetResetModeListener::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?