Elasticsearch will interpolate environment variables into settings read from elasticsearch.yml:
cluster.name: ${ES_CLUSTER_NAME}
Any environment variables used in this way must be set, but the error for an unset environment variable is kinda opaque:
Exception in thread "main" java.lang.IllegalArgumentException: Could not resolve placeholder 'ES_CLUSTER_NAME'
at org.elasticsearch.common.settings.PropertyPlaceholder.parseStringValue(PropertyPlaceholder.java:102)
at org.elasticsearch.common.settings.PropertyPlaceholder.replacePlaceholders(PropertyPlaceholder.java:57)
at org.elasticsearch.common.settings.Settings$Builder.replacePropertyPlaceholders(Settings.java:1314)
at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:56)
at org.elasticsearch.common.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:110)
at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:54)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:85)
at org.elasticsearch.cli.Command.main(Command.java:50)
at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:64)
Could we mention in this message that it relates to an environment variable mentioned in elasticsearch.yml which is not set?
Elasticsearch will interpolate environment variables into settings read from
elasticsearch.yml
:Any environment variables used in this way must be set, but the error for an unset environment variable is kinda opaque:
Could we mention in this message that it relates to an environment variable mentioned in
elasticsearch.yml
which is not set?