Oldest index version recorded in NodeMetadata – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8-8.9

Briefly, this error occurs when the Elasticsearch node has metadata indicating an older index version than the current one. This could be due to a failed upgrade or a node rejoining the cluster after a long period. To resolve this, you can try to upgrade the node again, ensuring all steps are correctly followed. Alternatively, you can remove the node from the cluster, delete its data directory, and re-add it to the cluster. However, ensure you have a backup of your data before performing these operations.

This guide will help you check for common problems that cause the log ” oldest index version recorded in NodeMetadata {} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: metadata, index, version, node.

Log Context

Log “oldest index version recorded in NodeMetadata {}” classname is NodeEnvironment.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            );
        }

        metadata.verifyUpgradeToCurrentVersion();

        logger.info("oldest index version recorded in NodeMetadata {}"; metadata.oldestIndexVersion());

        if (metadata.oldestIndexVersion().isLegacyIndexVersion()) {
            throw new IllegalStateException(
                "Cannot start this node because it holds metadata for indices with version ["
                    + metadata.oldestIndexVersion()

 

 [ratemypost]