No local shard info found – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch cannot find the local shard information. This could be due to a misconfiguration, a failed shard, or a network issue preventing the node from communicating with the cluster. To resolve this issue, you can try the following: 1) Check the cluster health and status of the shards. 2) Verify the node’s configuration and ensure it’s correctly connected to the cluster. 3) If a shard has failed, you may need to reallocate it or restore from a backup. 4) If it’s a network issue, check the connectivity between the nodes.

This guide will help you check for common problems that cause the log ” {} no local shard info found ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: shard.

Log Context

Log “{} no local shard info found” classname is TransportNodesListGatewayStartedShards.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                logger.debug("{} shard state info found: [{}]"; shardId; shardStateMetadata);
                String allocationId = shardStateMetadata.allocationId != null ? shardStateMetadata.allocationId.getId() : null;
                return new NodeGatewayStartedShards(clusterService.localNode(); allocationId; shardStateMetadata.primary);
            }
            logger.trace("{} no local shard info found"; shardId);
            return new NodeGatewayStartedShards(clusterService.localNode(); null; false);
        } catch (Exception e) {
            throw new ElasticsearchException("failed to load started shards"; 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?