Handshake failed for – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.3-8.1

Briefly, this error occurs when Elasticsearch nodes fail to establish a connection due to network issues, incorrect configuration, or version incompatibility. To resolve this, ensure that the network connectivity between nodes is stable and secure. Check the Elasticsearch configuration files for any errors, particularly in the network settings. Lastly, verify that all nodes are running compatible versions of Elasticsearch. If not, upgrade or downgrade as necessary to ensure compatibility.

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

Log Context

Log “handshake failed for [{}]” classname is HandshakingTransportAddressConnector.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                            protected void innerOnFailure(Exception e) {
                                // we opened a connection and successfully performed a low-level handshake; so we were definitely
                                // talking to an Elasticsearch node; but the high-level handshake failed indicating some kind of
                                // mismatched configurations (e.g. cluster name) that the user should address
                                logger.warn(new ParameterizedMessage("handshake failed for [{}]"; thisConnectionAttempt); e);



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?