Received a cluster state from and not part of the cluster should not happen – How to solve this OpenSearch error

Opster Team

Aug-23, Version: 1-1.1

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your OpenSearch operation.

Briefly, this error occurs when a node receives a cluster state update but it’s not part of the cluster. This could be due to network issues, incorrect configuration, or a node attempting to join the wrong cluster. To resolve this, ensure that all nodes have the correct cluster name in their configuration. Check your network settings to ensure all nodes can communicate properly. If the issue persists, consider restarting the node or the entire cluster to reset the state.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” received a cluster state from [{}] and not part of the cluster; should not happen ” to appear. To understand the issues related to this log, read the explanation below about the following OpenSearch concepts: cluster, discovery.

Log Context

Log “received a cluster state from [{}] and not part of the cluster; should not happen” classname is
We extracted the following from OpenSearch source code for those seeking an in-depth context :

            logger.warn("received cluster state from [{}] which is also master but with a different cluster name [{}]";
                incomingState.nodes().getMasterNode(); incomingClusterName);
            throw new IllegalStateException("received state from a node that is not part of the cluster");
        if (lastState.nodes().getLocalNode().equals(incomingState.nodes().getLocalNode()) == false) {
            logger.warn("received a cluster state from [{}] and not part of the cluster; should not happen";
            throw new IllegalStateException("received state with a local node that does not match the current local node");

        if (shouldIgnoreOrRejectNewClusterState(logger; lastState; incomingState)) {


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?

Get expert answers on Elasticsearch/OpenSearch