Failed to query nodes nodeIds – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.9-8.9

Briefly, this error occurs when Elasticsearch fails to query specific nodes identified by their nodeIds. This could be due to network issues, incorrect nodeIds, or the nodes being down or unresponsive. To resolve this, you can check the network connectivity, verify the nodeIds are correct, and ensure the nodes are up and running. If the nodes are unresponsive, you may need to restart them. Also, check the Elasticsearch logs for any additional information about the error.

This guide will help you check for common problems that cause the log ” Failed to query nodes [” + nodeIds + “] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: dangling, delete, admin, indices, query, node.

Log Context

Log “Failed to query nodes [” + nodeIds + “]” class name is TransportDeleteDanglingIndexAction.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 ListDanglingIndicesAction.INSTANCE;
 new ListDanglingIndicesRequest(indexUUID);
 listener.delegateFailure((l; response) -> {
 if (response.hasFailures()) {
 final String nodeIds = response.failures().stream().map(FailedNodeException::nodeId).collect(Collectors.joining(";"));
 ElasticsearchException e = new ElasticsearchException("Failed to query nodes [" + nodeIds + "]");  for (FailedNodeException failure : response.failures()) {
 logger.error("Failed to query node [" + failure.nodeId() + "]"; failure);
 e.addSuppressed(failure);
 }

 

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?