Existing connection to node closing new redundant connection – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.16-8.9

Briefly, this error occurs when Elasticsearch tries to establish a new connection to a node, but a connection already exists. This redundancy is unnecessary and can lead to resource wastage. To resolve this issue, you can 1) Check your cluster’s health and ensure all nodes are properly connected. 2) Review your network settings to avoid any misconfigurations. 3) Monitor your Elasticsearch logs for any unusual activity that might cause redundant connections. 4) Ensure your Elasticsearch version is up-to-date, as older versions may have bugs causing this issue.

This guide will help you check for common problems that cause the log ” existing connection to node [{}]; closing new redundant connection ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: node.

Log Context

Log “existing connection to node [{}]; closing new redundant connection” classname is ClusterConnectionManager.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                    assert Transports.assertNotTransportThread("connection validator success");
                    final var managerRefs = AbstractRefCounted.of(conn::onRemoved);
                    try {
                        if (connectedNodes.putIfAbsent(node; conn) != null) {
                            assert false : "redundant connection to " + node;
                            logger.warn("existing connection to node [{}]; closing new redundant connection"; node);
                            IOUtils.closeWhileHandlingException(conn);
                        } else {
                            logger.debug("connected to node [{}]"; node);
                            managerRefs.incRef();
                            try {

 

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?