Failed to read or upgrade local state exiting – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7-7.5

Briefly, this error occurs when Elasticsearch is unable to read or upgrade its local state due to issues like incompatible versions, corrupted files, or insufficient permissions. To resolve this, you can try the following: 1) Check and correct the version compatibility if you’ve recently upgraded Elasticsearch. 2) Inspect and repair any corrupted files in the data directory. 3) Ensure Elasticsearch has the necessary permissions to access its data directory. 4) If all else fails, consider restoring from a backup. Always ensure to backup your data before making significant changes.

This guide will help you check for common problems that cause the log ” failed to read or upgrade local state; exiting… ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: upgrade.

Log Context

Log “failed to read or upgrade local state; exiting…” classname is GatewayMetaState.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                final Manifest newManifest = new Manifest(manifest.getCurrentTerm(); manifest.getClusterStateVersion();
                        globalStateGeneration; indices);
                writer.writeManifestAndCleanup("startup"; newManifest);
            } catch (Exception e) {
                logger.error("failed to read or upgrade local state; exiting..."; e);
                throw e;
            }
        }
    }

 

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?