Un-assigning persistent tasks – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.15

Briefly, this error occurs when Elasticsearch is unable to maintain the assignment of persistent tasks to nodes due to issues like node failure, network disconnection, or resource constraints. To resolve this, you can try the following: 1) Check the health of your nodes and ensure they are running properly. 2) Verify your network connectivity. 3) Ensure your cluster has sufficient resources to handle the tasks. 4) Review your task assignment settings and adjust them if necessary. 5) If the problem persists, consider increasing the cluster size or optimizing your tasks to use fewer resources.

This guide will help you check for common problems that cause the log ” Un-assigning persistent tasks : ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, persistent.

Log Context

Log “Un-assigning persistent tasks : ” classname is TransportSetUpgradeModeAction.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            // We want to always have the same ordering of which tasks we un-allocate first.
            // However; the order in which the distributed tasks handle the un-allocation event is not guaranteed.
            .sorted(Comparator.comparing(PersistentTask::getTaskName))
            .collect(Collectors.toList());

        logger.info("Un-assigning persistent tasks : " +
            mlTasks.stream().map(PersistentTask::getId).collect(Collectors.joining("; "; "[ "; " ]")));

        TypedChainTaskExecutor> chainTaskExecutor =
            new TypedChainTaskExecutor(client.threadPool().executor(executor);
                r -> true;

 

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?