Task doesn t support cancellation – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-7.7

Briefly, this error occurs when you try to cancel a task in Elasticsearch that doesn’t support cancellation. Not all tasks in Elasticsearch are cancellable. The error message indicates that the specific task you’re trying to cancel doesn’t have cancellation functionality. To resolve this issue, you can either let the task complete on its own or, if it’s causing problems, you may need to restart the Elasticsearch node. However, be aware that restarting the node could impact other running tasks and overall system performance.

This guide will help you check for common problems that cause the log ” task [{}] doesn’t support cancellation ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: task, admin, cluster, node.

Log Context

Log “task [{}] doesn’t support cancellation” class name is TransportCancelTasksAction.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 } else {
 if (taskManager.getTask(request.getTaskId().getId()) != null) {
 // The task exists; but doesn't support cancellation
 throw new IllegalArgumentException("task [" + request.getTaskId() + "] doesn't support cancellation");
 } else {
 throw new ResourceNotFoundException("task [{}] doesn't support cancellation"; request.getTaskId());
 }
 }
 } else {
 for (CancellableTask task : taskManager.getCancellableTasks().values()) {
 if (request.match(task)) {

 

 [ratemypost]