You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
Description of the problem including expected versus actual behavior
When attempting to start Elasticsearch from the Ansible playbook, startup fails because of the below error. It appears the elasticsearch.yml.j2 tries to set xpack.ml.enabled to false, but because the machine learning plugin wasn't present in earlier versions, the startup fails because of the unknown setting. Removing the following entry from /templates/elasticsearch.yml.j2 allows for successful startup.
{% if not "ml" in es_xpack_features %}
xpack.ml.enabled: false
{% endif %}
I'm guessing there needs to be a way for that setting to be set conditionally upon if the es_version is 5.4 or greater and that would allow the playbook to successfully execute and start Elasticsearch with xpack on earlier versions.
Provide logs from Ansible:
Playbook times out on the
TASK [elastic.elasticsearch : Wait for elasticsearch to startup] step.
ES Log
[2017-12-19T00:25:00,138][ERROR][o.e.b.Bootstrap ] Exception
java.lang.IllegalArgumentException: unknown setting [xpack.ml.enabled] did you mean [xpack.graph.enabled]?
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:278) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:246) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.settings.SettingsModule.(SettingsModule.java:138) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.node.Node.(Node.java:325) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.node.Node.(Node.java:229) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap$6.(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.Command.main(Command.java:88) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) [elasticsearch-5.1.2.jar:5.1.2]
[2017-12-19T00:25:00,142][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [x.x.x.xxxx-Node-x.x.x.xxxx] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [xpack.ml.enabled] did you mean [xpack.graph.enabled]?
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) ~[elasticsearch-5.1.2.jar:5.1.2]
Caused by: java.lang.IllegalArgumentException: unknown setting [xpack.ml.enabled] did you mean [xpack.graph.enabled]?
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:278) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:246) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.settings.SettingsModule.(SettingsModule.java:138) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.node.Node.(Node.java:325) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.node.Node.(Node.java:229) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap$6.(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.1.2.jar:5.1.2]
The text was updated successfully, but these errors were encountered:
Elasticsearch version
5.1.2
Role version
Master
JVM version
1.8.0_151
OS version
Darwin Kernel Version 15.6.0
Description of the problem including expected versus actual behavior
When attempting to start Elasticsearch from the Ansible playbook, startup fails because of the below error. It appears the elasticsearch.yml.j2 tries to set xpack.ml.enabled to false, but because the machine learning plugin wasn't present in earlier versions, the startup fails because of the unknown setting. Removing the following entry from /templates/elasticsearch.yml.j2 allows for successful startup.
{% if not "ml" in es_xpack_features %}
xpack.ml.enabled: false
{% endif %}
I'm guessing there needs to be a way for that setting to be set conditionally upon if the es_version is 5.4 or greater and that would allow the playbook to successfully execute and start Elasticsearch with xpack on earlier versions.
Playbook (removed IP addresses)
user: ubuntu
become: true
roles:
es_instance_name: "{{inventory_hostname}}"
es_heap_size: "25g"
es_version: 5.1.2
es_enable_xpack: true
es_xpack_license: "{{ lookup('file', 'files/' + 'esXpackLicense.json') }}"
es_api_basic_auth_username: es_admin
es_api_basic_auth_password: password123
es_api_host: xx.x.x.xxx
es_api_port: 9200
es_config:
cluster.name: "elasticsearch"
discovery.zen.ping.unicast.hosts:
- xx.x.x.xxx:9300
http.port: 9200
transport.tcp.port: 9300
node.data: false
node.master: true
bootstrap.memory_lock: false
network.host: 0.0.0.0
es_xpack_features:
es_message_auth_file: system_key
es_users:
file:
es_admin:
password: password123
roles:
- admin
es_roles:
file:
admin:
cluster:
- all
indices:
- names: '*'
privileges:
- all
Provide logs from Ansible:
Playbook times out on the
TASK [elastic.elasticsearch : Wait for elasticsearch to startup] step.
ES Log
[2017-12-19T00:25:00,138][ERROR][o.e.b.Bootstrap ] Exception
java.lang.IllegalArgumentException: unknown setting [xpack.ml.enabled] did you mean [xpack.graph.enabled]?
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:278) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:246) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.settings.SettingsModule.(SettingsModule.java:138) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.node.Node.(Node.java:325) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.node.Node.(Node.java:229) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap$6.(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.Command.main(Command.java:88) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) [elasticsearch-5.1.2.jar:5.1.2]
[2017-12-19T00:25:00,142][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [x.x.x.xxxx-Node-x.x.x.xxxx] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [xpack.ml.enabled] did you mean [xpack.graph.enabled]?
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) ~[elasticsearch-5.1.2.jar:5.1.2]
Caused by: java.lang.IllegalArgumentException: unknown setting [xpack.ml.enabled] did you mean [xpack.graph.enabled]?
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:278) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:246) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.settings.SettingsModule.(SettingsModule.java:138) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.node.Node.(Node.java:325) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.node.Node.(Node.java:229) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap$6.(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.1.2.jar:5.1.2]
The text was updated successfully, but these errors were encountered: