Failed to open find files while reading metadata snapshot – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch is unable to access or read the metadata snapshot files. This could be due to issues with file permissions, disk space, or corruption of the snapshot files. To resolve this, you can check and adjust the file permissions, ensure there is enough disk space, or restore the snapshot files from a backup. If the issue persists, you may need to recreate the snapshot or rebuild the index.

This guide will help you check for common problems that cause the log ” Failed to open / find files while reading metadata snapshot ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: metadata, index, snapshot.

Log Context

Log “Failed to open / find files while reading metadata snapshot” classname is Store.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        } catch (IndexNotFoundException ex) {
            // that's fine - happens all the time no need to log
        } catch (CorruptIndexException ex) {
            logger.info(() -> format("%s: corrupted"; shardId); ex);
        } catch (FileNotFoundException | NoSuchFileException ex) {
            logger.info("Failed to open / find files while reading metadata snapshot"; ex);
        } catch (ShardLockObtainFailedException ex) {
            logger.info(() -> format("%s: failed to obtain shard lock"; shardId); ex);
        }
        return MetadataSnapshot.EMPTY;
    }

 

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?