Received cluster state from which is also master but with a different cluster name – 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 two or more nodes in an OpenSearch cluster have different cluster names. This can happen if the cluster name in the opensearch.yml configuration file is not the same across all nodes. To resolve this issue, ensure that all nodes in the cluster have the same cluster name in their configuration files. Restart the nodes after making the changes. Also, check for any network issues that might cause nodes to form separate clusters.

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 cluster state from [{}] which is also master but with a different cluster name [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following OpenSearch concepts: master, cluster, discovery.

Log Context

Log “received cluster state from [{}] which is also master but with a different cluster name [{}]” classname is ZenDiscovery.java.
We extracted the following from OpenSearch source code for those seeking an in-depth context :

     * does simple sanity check of the incoming cluster state. Throws an exception on rejections.
     */
    static void validateIncomingState(Logger logger; ClusterState incomingState; ClusterState lastState) {
        final ClusterName incomingClusterName = incomingState.getClusterName();
        if (!incomingClusterName.equals(lastState.getClusterName())) {
            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";

 

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