Can t read metadata from store will not reuse local files during restore – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.13

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 of metadata files or insufficient permissions. To resolve this, you can try the following: 1) Check and repair any corrupted metadata files. 2) Ensure Elasticsearch has the necessary permissions to access the local store. 3) If the issue persists, consider deleting the existing local files and reindexing from the source. Always ensure to have a backup before performing any operation that could potentially lead to data loss.

This guide will help you check for common problems that cause the log ” [{}] [{}] Can’t read metadata from store; will not reuse local files during restore ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: metadata, repositories, blobstore, restore.

Log Context

Log “[{}] [{}] Can’t read metadata from store; will not reuse local files during restore” classname is FileRestoreContext.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            } catch (org.apache.lucene.index.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(new ParameterizedMessage("[{}] [{}] Can't read metadata from store; will not reuse local files during restore";
                    shardId; snapshotId); e);
                recoveryTargetMetadata = Store.MetadataSnapshot.EMPTY;
            }
            final List filesToRecover = new ArrayList();
            final Map snapshotMetadata = new HashMap();

 

 [ratemypost]