Shard state info found – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch finds shard state information that it didn’t expect to find. This could be due to a failed node recovery, or a failed shard relocation. To resolve this issue, you can try restarting the Elasticsearch node. If that doesn’t work, you may need to manually delete the unexpected shard state information. Always ensure to back up your data before performing such operations. Additionally, check your cluster health and logs regularly to prevent such issues.

This guide will help you check for common problems that cause the log ” {} shard state 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 “{} shard state info found: [{}]” classname is TransportNodesListGatewayStartedShards.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                            exception
                        );
                    }
                }

                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);

 

 [ratemypost]