Briefly, this error occurs when Elasticsearch is unable to find a required setting in its configuration file. The setting is identified by the variable “configKey”. This could be due to a missing or incorrectly named setting. To resolve this issue, you can check the Elasticsearch configuration file (usually “elasticsearch.yml”) for the missing setting. Ensure that the setting is correctly named as per the Elasticsearch documentation. If the setting is missing, add it with the appropriate value. If the setting is optional and not needed, you can remove the code that requires it.
This guide will help you check for common problems that cause the log ” missing required setting [” + configKey + “] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.
Log Context
Log “missing required setting [” + configKey + “]” class name is HttpExporter.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :
private static HttpHost[] createHosts(final Config config) { final Listhosts = HOST_SETTING.getConcreteSettingForNamespace(config.name()).get(config.settings()); String configKey = HOST_SETTING.getConcreteSettingForNamespace(config.name()).getKey(); if (hosts.isEmpty()) { throw new SettingsException("missing required setting [" + configKey + "]"); } final List httpHosts = new ArrayList<>(hosts.size()); boolean httpHostFound = false; boolean httpsHostFound = false;