The following ML jobs could not be deleted String join jobIds – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.8-8.9

Briefly, this error occurs when Elasticsearch Machine Learning (ML) jobs are unable to be deleted due to active datafeeds, ongoing tasks, or incorrect job IDs. To resolve this, ensure that the datafeeds associated with the jobs are stopped before deletion. Also, check if there are any ongoing tasks related to the jobs and wait for them to complete. Lastly, verify the job IDs are correct and the jobs exist.

This guide will help you check for common problems that cause the log ” The following ML jobs could not be deleted: [” + String.join(“;”; jobIds) + “] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “The following ML jobs could not be deleted: [” + String.join(“;”; jobIds) + “]” classname is MlDailyMaintenanceService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                    .map(DeleteJobAction.Request::getJobId)
                    .collect(toList());
                if (jobIds.isEmpty()) {
                    logger.info("Successfully completed [ML] maintenance task: triggerDeleteJobsInStateDeletingWithoutDeletionTask");
                } else {
                    logger.info("The following ML jobs could not be deleted: [" + String.join(";"; jobIds) + "]");
                }
                finalListener.onResponse(AcknowledgedResponse.TRUE);
            };
            finalListener::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?