Unknown response type expected NodeLocalGatewayStartedShards or FailedNodeException – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when Elasticsearch expects a response type of either NodeLocalGatewayStartedShards or FailedNodeException, but receives something different. This could be due to a misconfiguration or a bug in the system. To resolve this issue, you can try the following: 1) Check your Elasticsearch configuration for any errors or inconsistencies. 2) Ensure that all nodes in your cluster are running the same version of Elasticsearch. 3) If the error persists, consider restarting your Elasticsearch nodes one by one to refresh the system.

This guide will help you check for common problems that cause the log ” unknown response type [{}]; expected NodeLocalGatewayStartedShards or FailedNodeException ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: node, response and shards.

Log Context

Log “unknown response type [{}]; expected NodeLocalGatewayStartedShards or FailedNodeException” classname is TransportNodesListGatewayStartedShards.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

             if (resp instanceof NodeGatewayStartedShards) { // will also filter out null response for unallocated ones
                nodesList.add((NodeGatewayStartedShards) resp);
            } else if (resp instanceof FailedNodeException) {
                failures.add((FailedNodeException) resp);
            } else {
                logger.warn("unknown response type [{}]; expected NodeLocalGatewayStartedShards or FailedNodeException"; resp);
            }
        }
        return new NodesGatewayStartedShards(clusterName; nodesList.toArray(new NodeGatewayStartedShards[nodesList.size()]);
                failures.toArray(new FailedNodeException[failures.size()]));
    }




 

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?