Unexpected token while reading snapshot metadata – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 1.7-1.7

Briefly, this error occurs when Elasticsearch encounters an unexpected token or character while reading the metadata of a snapshot. This could be due to a corrupted snapshot or an issue with the underlying storage system. To resolve this issue, you can try the following: 1) Check the integrity of your snapshots and restore from a valid snapshot if available. 2) Inspect the underlying storage system for any issues and fix them. 3) If the problem persists, you may need to recreate the snapshot. Always ensure your snapshots are created and stored correctly to prevent such issues.

This guide will help you check for common problems that cause the log ” [{}] [{}] unexpected token while reading snapshot metadata [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: blobstore, metadata, repositories, repository-azure and snapshot.

Log Context

Log “[{}] [{}] unexpected token while reading snapshot metadata [{}]” classname is BlobStoreRepository.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                    if (!ignoreIndexErrors) {
                        throw new ElasticsearchParseException("unexpected token  [" + token + "]");
                    } else {
                        logger.warn("[{}] [{}] unexpected token while reading snapshot metadata [{}]"; snapshotId; index; token);
            } catch (IOException ex) {
                if (!ignoreIndexErrors) {
                    throw new SnapshotException(snapshotId; "failed to read metadata"; ex);


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?