No new nodes should be created when a new discovery view is accepted – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when Elasticsearch tries to add a new node to the cluster during the discovery phase, but the cluster state doesn’t allow it. This could be due to a misconfiguration or network issues. To resolve this, you can check the cluster settings and ensure that the new node has the correct configuration. Also, verify the network connectivity between the nodes. If the problem persists, consider restarting the Elasticsearch service or the entire cluster, but be aware that this could lead to downtime.

This guide will help you check for common problems that cause the log ” No new nodes should be created when a new discovery view is accepted ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: discovery.

Log Context

Log “No new nodes should be created when a new discovery view is accepted” classname is LocalDiscovery.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                     
Override
                    public ClusterState execute(ClusterState currentState) {
                        DiscoveryNodes newNodes = currentState.nodes().removeDeadMembers(newMembers; master.localNode().id());
                        DiscoveryNodes.Delta delta = newNodes.delta(currentState.nodes());
                        if (delta.added()) {
                            logger.warn("No new nodes should be created when a new discovery view is accepted");
                        }
                        // reroute here; so we eagerly remove dead nodes from the routing
                        ClusterState updatedState = ClusterState.builder(currentState).nodes(newNodes).build();
                        RoutingAllocation.Result routingResult = master.routingService.getAllocationService().reroute(
                                ClusterState.builder(updatedState).build(); "elected as master");



 

 [ratemypost]