# Unable to enable cluster security

**URL:** <https://discuss.elastic.co/t/unable-to-enable-cluster-security/213741>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [January 3, 2020, 7:13pm UTC](https://discuss.elastic.co/t/unable-to-enable-cluster-security/213741 "2020-01-03T19:13:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terran](https://avatars.discourse-cdn.com/v4/letter/t/94ad74/32.png) [@Terran](https://discuss.elastic.co/u/Terran)\
**Post date:** [January 3, 2020, 7:13pm UTC](https://discuss.elastic.co/t/unable-to-enable-cluster-security/213741/1 "2020-01-03T19:13:44Z")

</div>

I have am attempting to enable the basic security as provided in the xpack.  
I stopped ES across the cluster, then added the key xpack.security.enabled to each .yml. When I attempted to restart the services, elasticsearch failed to start. Not really sure why, seems like the yml isn't written correctly

_at org.elasticsearch.common.settings.Settings$Builder.loadFromStream  
Jan 03 08:37:28 elasticsearch[15435]: ... 8 more  
Jan 03 08:37:28 elasticsearch[15435]: Caused by: while parsing a block mapping  
Jan 03 08:37:28 elasticsearch[15435]: in 'reader', line 17, column 1:  
Jan 03 08:37:28 elasticsearch[15435]: cluster.name: Elasticsearch\_Test  
Jan 03 08:37:28 elasticsearch[15435]: ^  
Jan 03 08:37:28 elasticsearch[15435]: expected , but found BlockMappingStart  
Jan 03 08:37:28 elasticsearch[15435]: in 'reader', line 90, column 2:  
Jan 03 08:37:28 elasticsearch[15435]: xpack.security.neabled: true  
Jan 03 08:37:28 elasticsearch[15435]: ^  
Jan 03 08:37:28 elasticsearch[15435]: at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce  
Jan 03 08:37:28 elasticsearch[15435]: at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:15  
Jan 03 08:37:28 elasticsearch[15435]: at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:167  
Jan 03 08:37:28 elasticsearch[15435]: at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLPa  
Jan 03 08:37:28 elasticsearch[15435]: ... 13 more  
Jan 03 08:37:28 polkitd[612]: Unregistered Authentication Agent for unix-process:15411:509125164 (system b  
Jan 03 08:37:28 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE  
Jan 03 08:37:28 systemd[1]: Failed to start Elasticsearch._

If I comment out the new key services start normally.

---

<div class="post-metadata">

**Author:** ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)\
**Post date:** [January 3, 2020, 8:07pm UTC](https://discuss.elastic.co/t/unable-to-enable-cluster-security/213741/2 "2020-01-03T20:07:36Z")

</div>

> [@Terran](#):
>
> xpack.security.neabled

You made a typo..

---

<div class="post-metadata">

**Author:** ![Terran](https://avatars.discourse-cdn.com/v4/letter/t/94ad74/32.png) [@Terran](https://discuss.elastic.co/u/Terran)\
**Post date:** [January 4, 2020, 6:23pm UTC](https://discuss.elastic.co/t/unable-to-enable-cluster-security/213741/3 "2020-01-04T18:23:27Z")

</div>

Ugh. Thanks, it was a long shift and I will fix it come Monday. Good catch.

---

<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:** [February 1, 2020, 6:23pm UTC](https://discuss.elastic.co/t/unable-to-enable-cluster-security/213741/4 "2020-02-01T18:23:37Z")

</div>

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