Error stopping the model after task cancellation – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.1-8.2

Briefly, this error occurs when Elasticsearch tries to stop a machine learning model after a task has been cancelled, but encounters an issue. This could be due to a network problem, a node failure, or an issue with the model itself. To resolve this, you could try restarting the Elasticsearch node, checking the network connections, or investigating the machine learning model for any inconsistencies or errors. If the problem persists, consider reindexing your data or recreating the machine learning model.

This guide will help you check for common problems that cause the log ” [{}] error stopping the model after task cancellation ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: task, plugin.

Log Context

Log “[{}] error stopping the model after task cancellation” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :"[{}] task cancelled due to reason [{}]"; getModelId(); reason);
                acknowledgedResponse -> {};
                e -> logger.error(new ParameterizedMessage("[{}] error stopping the model after task cancellation"; getModelId()); e)

    public void infer(Map doc; InferenceConfigUpdate update; TimeValue timeout; ActionListener listener) {


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?