The task with id request getId doesn t exist – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.9

Briefly, this error occurs when you’re trying to access or manipulate a task in Elasticsearch using an ID that doesn’t exist in the task management API. This could be due to a typo in the ID, or the task was deleted or never existed. To resolve this issue, you can verify the task ID you’re using is correct. If the task should exist, check your task creation process to ensure it’s functioning properly. If the task was deleted, you may need to recreate it or restore it from a backup if available.

This guide will help you check for common problems that cause the log ” the task with id [” + request.getId() + “] doesn’t exist ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, task, request.

Log Context

Log “the task with id [” + request.getId() + “] doesn’t exist” class name is TransportDeleteRollupJobAction.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 if (pTasksMeta != null && pTasksMeta.getTask(request.getId()) != null) {
 super.doExecute(task; request; listener);
 } else {
 // If we couldn't find the job in the persistent task CS; it means it was deleted prior to this call;
 // no need to go looking for the allocated task
 listener.onFailure(new ResourceNotFoundException("the task with id [" + request.getId() + "] doesn't exist"));
 }  } else {
 // Delegates DeleteJob to elected master node; so it becomes the coordinating node.
 // Non-master nodes may have a stale cluster state that shows jobs which are cancelled

 

 [ratemypost]