Elasticsearch 7.2 not starting on CentOS 7 because of xpack.security.enabled setting

I have just installed Elasticsearch 7.2 OSS (rpm) using Ansible 2.8.2 on a CentOS 7 POC server.
The Ansible playbook ran successfully.

I used following path to download it
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-7.2.0-x86_64.rpm

When I checked the status of elasticsearch.service, it is not in a running state.

[user1@devsrv001 ~]$ systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2019-07-17 10:56:11 EDT; 10s ago
Docs: http://www.elastic.co
Process: 24260 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 24260 (code=exited, status=1/FAILURE)

Jul 17 10:56:05 devsrv001 systemd[1]: Started Elasticsearch.
Jul 17 10:56:06 devsrv001 elasticsearch[24260]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Jul 17 10:56:06 devsrv001 elasticsearch[24260]: OpenJDK 64-Bit Server VM warning: UseAVX=2 is not supported on this CPU, setting it to UseAVX=1
Jul 17 10:56:11 devsrv001 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jul 17 10:56:11 devsrv001 systemd[1]: Unit elasticsearch.service entered failed state.
Jul 17 10:56:11 devsrv001 systemd[1]: elasticsearch.service failed.

As per Elasticsearch documentation, I went to /etc/log/elasticsearch to look for logs. Only logs I found there were gc.log.*

Then I looked at logs located at /srchdata/elasticsearch/logs

And I noticed below error in these log files. It is related to xpack.security.enabled. Just wondering what is the correct way to enable basic authentication with Elasticsearch 7.2 OSS flavor?

"stacktrace": ["java.lang.IllegalArgumentException: unknown setting [xpack.security.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings",
"at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:531) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:476) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:447) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:418) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.common.settings.SettingsModule.(SettingsModule.java:148) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.node.Node.(Node.java:342) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.node.Node.(Node.java:251) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:221) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) [elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) [elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) [elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-7.2.0.jar:7.2.0]",
"at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-7.2.0.jar:7.2.0]",
"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) [elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-7.2.0.jar:7.2.0]"] }
{"type": "server", "timestamp": "2019-07-17T10:56:10,949-0400", "level": "WARN", "component": "o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "advisor-dev-cluster", "node.name": "advisor-node-osbaz1dev14017", "message": "uncaught exception in thread [main]" ,
"stacktrace": ["org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [xpack.security.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings",
"at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-7.2.0.jar:7.2.0]",
"at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.2.0.jar:7.2.0]",
"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.2.0.jar:7.2.0]",
"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.2.0.jar:7.2.0]",
"Caused by: java.lang.IllegalArgumentException: unknown setting [xpack.security.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings",
"at ...

Just FYI: I am new to linux / Elasticsearch, just getting my feet wet

-Vinod

The OSS distribution does not include any commercial features, which is why it does not recognize any security related configuration. If you want to use the free security features you need the default distribution.

Thank you @Christian_Dahlqvist, I reinstalled by switching to Basic
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.2.0-x86_64.rpm

For now I kept
xpack.security.enabled = false
(I am going through the documentation to wrap my head around)

For now my ElasticSearch instance is up and running.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.