Job got reassigned while stopping Marking as completed – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.8-8.9

Briefly, this error occurs when an Elasticsearch job is being stopped but gets reassigned to another node during the process. This could be due to node failures or network issues. To resolve this, ensure that your cluster is stable and that there are no network disruptions. If the problem persists, consider increasing the timeout settings for job reassignment. Also, check your cluster’s health and logs for any signs of issues that could be causing the reassignments.

This guide will help you check for common problems that cause the log ” [{}] job got reassigned while stopping. Marking as completed ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, task.

Log Context

Log “[{}] job got reassigned while stopping. Marking as completed” classname is OpenJobPersistentTasksExecutor.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            return;
        }
        // If the job is closing; simply stop and return
        if (JobState.CLOSING.equals(jobState)) {
            // Mark as completed instead of using `stop` as stop assumes native processes have started
            logger.info("[{}] job got reassigned while stopping. Marking as completed"; params.getJobId());
            jobTask.markAsCompleted();
            return;
        }
        // If the job is failed then the Persistent Task Service will
        // try to restart it on a node restart. Exiting here leaves the

 

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?