Handshake failed for – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.3-8.1

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

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.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

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 :

                            @Override
                            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);
                                IOUtils.closeWhileHandlingException(connection);
                                listener.onFailure(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?