Elasticsearch 7.2.0 | Windows | Basic Plan | Elasticsearch service doesn't start when x-pack.security.enabled=true

Hi Team,
This is the continuation of the Github issue page that I have opened.

Elasticsearch Version: 7.2.0
Java Version: 12
OS: Windows
Environment: Development / Local
Installation Mode: .ZIP file
Java Heap Size: 2 GB

Elasticsearch.YML
cluster.name: my-application
node.name: node-1
# xpack.security.enabled: true

Elasticsearch Cluster works well when "xpack.security.enabled: true" is commented out. When I un-commented it and restart the elasticsearch services, it throws the following error. Actually, it's not just the above line, pretty much if I uncomment any other parameter, ES doesn't start up. For example, "bootstrap.memory_lock: true" :
Capture

Here's the log:
[2019-07-08T00:00:00,727][INFO ][o.e.c.m.MetaDataCreateIndexService] [node-1] [.monitoring-es-7-2019.07.08] creating index, cause [auto(bulk api)], templates [.monitoring-es], shards [1]/[0], mappings [_doc]
[2019-07-08T00:00:00,889][INFO ][o.e.c.r.a.AllocationService] [node-1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.monitoring-es-7-2019.07.08][0]] ...]).
[2019-07-08T11:48:24,282][INFO ][o.e.n.Node ] [node-1] stopping ...
[2019-07-08T11:48:24,293][INFO ][o.e.x.w.WatcherService ] [node-1] stopping watch service, reason [shutdown initiated]
[2019-07-08T11:48:24,451][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [node-1] [controller/30736] [Main.cc@150] Ml controller exiting
[2019-07-08T11:48:24,453][INFO ][o.e.x.m.p.NativeController] [node-1] Native controller process has stopped - no new native processes can be started
[2019-07-08T11:48:27,618][INFO ][o.e.n.Node ] [node-1] stopped
[2019-07-08T11:48:27,618][INFO ][o.e.n.Node ] [node-1] closing ...
[2019-07-08T11:48:27,630][INFO ][o.e.n.Node ] [node-1] closed

Let me know if there's anything else you need.

Hi there,

When you want to enable security, you need to configure some settings too. Please take a look at our tutorial that will give you a good starting point.

Things can fail for different reasons so I wouldn't assume that the cause is the same in both cases.

There is nothing useful in the logs that you are sharing with us, what exactly happens when you start with "xpack.security.enabled: true" ?What is the error message you get ? Is an error printed at the logs ? Is there any additional information in the System Event Log in windows ?

Hi @ikakavas, I gave up on 7.2.0. Started working on ES 7.0.0. Can I still continue to post my queries in this thread?
If yes, please continue to read further. I could able to start the Elasticsearch services without any errror with the following ES YAML code:

cluster.name: my-application
node.name: node-1
path.data: D:/Elasticsearch/elasticsearch-7.0.0-windows-x86_64/data/
path.logs: D:/Elasticsearch/elasticsearch-7.0.0-windows-x86_64/elasticsearch-7.0.0/logs/
bootstrap.memory_lock: true
xpack.security.enabled: true
discovery.type: single-node

I followed the tutorial you shared with me. The next step after making my ES single-node, I have to start my ES and run "elasticsearch-setup-passwords interactive" in ES_PATH using the CLI. When i did that, I got the below error:
Capture

I have tried adding "xpack.license.self_generated.type: basic" in ES YAML file. Still no go.

Hi @ikakavas, I gave up on 7.2.0. Started working on ES 7.0.0.

I would strongly challenge this decision unless you have a very good reason to do so.

The error you get makes sense. Elasticsearch 7.0.0 starts with a basic license that doesn't include security. You need a trial license or a gold/platinum one to get security features in 7.0.0

This works only if you set it before you run Elasticsearch for the first time. In order to start a trial license now, you'd need to use the start trial API

Again, and especially if you're planning to use security features, why not use 7.2.0 ?

Elasticsearch 7.0.0 basic version doesn't come up with native authentication feature? I just need to protect my data with RBAC. That's it

The reason that I switched from 7.2.0 to 7.0.0 is because ES 7.2.0 is driving me nuts to make it stable.

No. Please see Security for Elasticsearch is now free | Elastic Blog

I would advise you to start over, following the documentation, setting only options and setting that you know you need, and when stuck, someone in the forums will be able to offer assistance, granted that you can share your logs, exact error messages and the exact steps you have performed that have brought you up to the current point in time.

Hi @ikakavas, Thanks for your help and replies. I did install ES 7.1.0 and xpack security in a single go. It works fine and stable.

Thanks again.

1 Like

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