Refreshing metadata failed – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch is unable to update the metadata for a particular index or cluster. This could be due to a variety of reasons such as network issues, insufficient permissions, or a problem with the underlying storage system. To resolve this issue, you can try the following: 1) Check the network connectivity and firewall settings, 2) Verify the permissions for the Elasticsearch process, 3) Inspect the health of the storage system, and 4) Check the Elasticsearch logs for more detailed error messages.

This guide will help you check for common problems that cause the log ” refreshing metadata failed ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, metadata.

Log Context

Log “refreshing metadata failed” classname is TokenService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            if (custom != null && custom.equals(getTokenMetadata()) == false) {
                logger.info("refresh keys");
                try {
                    refreshMetadata(custom);
                } catch (Exception e) {
                    logger.warn("refreshing metadata failed"; e);
                }
                logger.info("refreshed keys");
            }
        });
    }

 

 [ratemypost]