Can t read metadata from store will not reuse any local file while restoring – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 5-5

Briefly, this error occurs when Elasticsearch is unable to read metadata from the local store during a restore operation. This could be due to corruption or inaccessibility of the metadata files. To resolve this issue, you can try the following: 1) Check the file permissions and ensure Elasticsearch has the necessary access. 2) Verify the integrity of the metadata files. If they are corrupted, you may need to restore them from a backup. 3) If the error persists, consider reindexing your data from the source, as this will create a new set of metadata files.

This guide will help you check for common problems that cause the log ” {} Can’t read metadata from store; will not reuse any local file while restoring ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: blobstore, repositories and repository-azure.

Log Context

Log “{} Can’t read metadata from store; will not reuse any local file while restoring” classname is BlobStoreRepository.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                 } catch (IndexNotFoundException e) {
                    // happens when restore to an empty shard; not a big deal
                    logger.trace("[{}] [{}] restoring from to an empty shard"; shardId; snapshotId);
                    recoveryTargetMetadata = Store.MetadataSnapshot.EMPTY;
                } catch (IOException e) {
                    logger.warn((Supplier>) () -> new ParameterizedMessage("{} Can't read metadata from store; will not reuse any local file while restoring"; shardId); e);
                    recoveryTargetMetadata = Store.MetadataSnapshot.EMPTY;
                }

                final List filesToRecover = new ArrayList();
                final Map snapshotMetaData = new HashMap();




 

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?