%s discovery result – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.4-8.9

Briefly, this error occurs when Elasticsearch struggles to discover or connect to other nodes in the cluster. This could be due to network issues, incorrect configuration, or firewall restrictions. To resolve this, ensure that all nodes have the correct network configuration and are accessible. Check the firewall settings to allow inter-node communication. Also, verify the ‘discovery.zen.ping.unicast.hosts’ setting in the Elasticsearch configuration file to ensure it lists all the correct nodes.

This guide will help you check for common problems that cause the log ” %s discovery result ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: discovery.

Log Context

Log “%s discovery result” classname is PeerFinder.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                @Override
                public void onFailure(Exception e) {
                    if (verboseFailureLogging) {
                        if (logger.isDebugEnabled()) {
                            // log message at level WARN; but since DEBUG logging is enabled we include the full stack trace
                            logger.warn(() -> format("%s discovery result"; Peer.this); e);
                        } else {
                            final StringBuilder messageBuilder = new StringBuilder();
                            Throwable cause = e;
                            while (cause != null && messageBuilder.length() 

 

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?