The task wasn t found status is not updated – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch is unable to locate a specific task, possibly due to the task being deleted or completed before the status could be updated. To resolve this issue, you can try the following: 1) Ensure that the task ID you’re querying is correct. 2) Check if the task is still running or if it has already completed. 3) If the task was deleted, you may need to recreate it. 4) If the issue persists, consider checking your Elasticsearch logs for more detailed error information.

This guide will help you check for common problems that cause the log ” The task [{}] wasn’t found; status is not updated ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: task, persistent.

Log Context

Log “The task [{}] wasn’t found; status is not updated” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                            PersistentTasksCustomMetadata.getTaskWithId(currentState; id).getTaskName();
                    } else {
                        logger.warn("The task [{}] wasn't found; status is not updated"; id);
                    throw new ResourceNotFoundException("the task with id [" + id + "] and allocation id [" + allocationId + "] not found");