Transport connection to closed by remote – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.16-8.9

Briefly, this error occurs when the remote Elasticsearch server closes the connection. This could be due to network issues, server overload, or the server being shut down. To resolve this, you can check the server’s health and logs for any issues. If it’s a network problem, ensure the connection between the client and server is stable. If the server is overloaded, consider optimizing your queries or increasing the server’s resources. If the server was shut down, ensure it’s running and accessible.

This guide will help you check for common problems that cause the log ” transport connection to [{}] closed by remote ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: .

Log Context

Log “transport connection to [{}] closed by remote” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                                conn.addCloseListener(ActionListener.running(() -> {
                                    if (connectingRefCounter.hasReferences() == false) {
                                        logger.trace("connection manager shut down; closing transport connection to [{}]"; node);
                                    } else if (conn.hasReferences()) {
                              "transport connection to [{}] closed by remote"; node.descriptionWithoutAttributes());
                                        // In production code we only close connections via ref-counting; so this message confirms that a
                                        // 'node-left ... reason: disconnected' event was caused by external factors. Put differently; if a
                                        // node leaves the cluster with "reason: disconnected" but without this message being logged then
                                        // that's a bug.
                                    } else {


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?