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

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-2-not-starting-on-centos-7-because-of-xpack-security-enabled-setting/191055>\
**Category:** Elasticsearch\
**Created:** [July 17, 2019, 4:06pm UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-starting-on-centos-7-because-of-xpack-security-enabled-setting/191055 "2019-07-17T16:06:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinodres](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinodres/32/50379_2.png) [@vinodres](https://discuss.elastic.co/u/vinodres)\
**Post date:** [July 17, 2019, 4:06pm UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-starting-on-centos-7-because-of-xpack-security-enabled-setting/191055/1 "2019-07-17T16:06:40Z")

</div>

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](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](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

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 17, 2019, 4:14pm UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-starting-on-centos-7-because-of-xpack-security-enabled-setting/191055/2 "2019-07-17T16:14:48Z")

</div>

> [@vinodres](#):
>
> Elasticsearch 7.2 OSS

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.

---

<div class="post-metadata">

**Author:** ![vinodres](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinodres/32/50379_2.png) [@vinodres](https://discuss.elastic.co/u/vinodres)\
**Post date:** [July 20, 2019, 12:41pm UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-starting-on-centos-7-because-of-xpack-security-enabled-setting/191055/3 "2019-07-20T12:41:53Z")

</div>

Thank you @Christian_Dahlqvist, I reinstalled by switching to Basic  
[https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.2.0-x86\_64.rpm](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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 17, 2019, 12:42pm UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-starting-on-centos-7-because-of-xpack-security-enabled-setting/191055/4 "2019-08-17T12:42:00Z")

</div>

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