Marking node as not ready because it s shutting down – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.2-8.9

Briefly, this error occurs when a node in the Elasticsearch cluster is in the process of shutting down. This could be due to a manual shutdown command, a system error, or resource constraints. To resolve this issue, you can check the system logs for any errors that might have triggered the shutdown. If it’s a resource issue, consider scaling up your system or optimizing your Elasticsearch configurations. If it was a manual shutdown, ensure it’s properly restarted and the cluster state is green. Regular monitoring and maintenance of the cluster can prevent such issues.

This guide will help you check for common problems that cause the log ” marking node as not ready because it’s shutting down ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: node.

Log Context

Log “marking node as not ready because it’s shutting down” classname is ReadinessService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        this.masterElected = clusterState.nodes().getMasterNodeId() != null;
        this.shuttingDown = shutdownNodeIds.contains(clusterState.nodes().getLocalNodeId());

        if (shuttingDown) {
            setReady(false);
            logger.info("marking node as not ready because it's shutting down");
        } else {
            if (clusterState.nodes().getLocalNodeId().equals(clusterState.nodes().getMasterNodeId())) {
                setReady(fileSettingsApplied);
            } else {
                setReady(masterElected);

 

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?