Received a join request for an existing node – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 1.3-1.3

Briefly, this error occurs when a node tries to join a cluster but its ID already exists in the cluster. This can happen if the node was previously part of the cluster and was not properly removed, or if there’s a duplicate node ID. To resolve this, you can restart the node, ensuring it has a unique ID. If the problem persists, you may need to remove the node from the cluster and add it again. Also, check your network settings to ensure nodes are communicating correctly.

This guide will help you check for common problems that cause the log ” received a join request for an existing node [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: discovery, join, node and request.

Log Context

Log “received a join request for an existing node [{}]” classname is ZenDiscovery.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

             clusterService.submitStateUpdateTask("zen-disco-receive(join from node[" + node + "])"; Priority.IMMEDIATE; new ProcessedClusterStateUpdateTask() {
                
Override
                public ClusterState execute(ClusterState currentState) {
                    if (currentState.nodes().nodeExists(node.id())) {
                        // the node already exists in the cluster
                        logger.info("received a join request for an existing node [{}]"; node);
                        // still send a new cluster state; so it will be re published and possibly update the other node
                        return ClusterState.builder(currentState).build();
                    }
                    DiscoveryNodes.Builder builder = DiscoveryNodes.builder(currentState.nodes());
                    for (DiscoveryNode existingNode : currentState.nodes()) {



 

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?