Expected but did not find a dynamic hosts list at – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-6.8

Briefly, this error occurs when Elasticsearch is unable to locate a dynamic hosts list at the specified version, in this case, version 6.8. This could be due to a misconfiguration in the Elasticsearch.yml file or the absence of the required hosts list. To resolve this issue, you can check and correct the Elasticsearch configuration file, ensuring that the dynamic hosts list is properly defined. Alternatively, you can upgrade or downgrade your Elasticsearch version to match the version that contains the required dynamic hosts list.

This guide will help you check for common problems that cause the log ” Expected; but did not find; a dynamic hosts list at [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: discovery, discovery-file and hosts.

Log Context

Log “Expected; but did not find; a dynamic hosts list at [{}]” classname is FileBasedUnicastHostsProvider.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

             deprecationLogger.deprecated("Found dynamic hosts list at [{}] but this path is deprecated. This list should be at [{}] " +
                "instead. Support for the deprecated path will be removed in future."; legacyUnicastHostsFilePath; unicastHostsFilePath);
            return readFileContents(legacyUnicastHostsFilePath);

        logger.warn("expected; but did not find; a dynamic hosts list at [{}]"; unicastHostsFilePath);

        return Collections.emptyList();

    private List readFileContents(Path path) {


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?