# Kibana not started after activated xpack.security

**URL:** <https://discuss.elastic.co/t/kibana-not-started-after-activated-xpack-security/275710>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [June 11, 2021, 6:42pm UTC](https://discuss.elastic.co/t/kibana-not-started-after-activated-xpack-security/275710 "2021-06-11T18:42:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ilya\_21bA](https://avatars.discourse-cdn.com/v4/letter/i/b77776/32.png) [@Ilya\_21bA](https://discuss.elastic.co/u/Ilya_21bA)\
**Post date:** [June 11, 2021, 6:42pm UTC](https://discuss.elastic.co/t/kibana-not-started-after-activated-xpack-security/275710/1 "2021-06-11T18:42:20Z")

</div>

After activated xpack.security in elastic.yml kibana crash  
Logs:

```auto
{"type":"log","@timestamp":"2021-06-11T21:28:44+03:00","tags":["debug","plugins-discovery"],"pid":7360,"message":"Successfully discovered plugin \"consoleExtensions\" at \"C:\\ELK2\\kibana-7.13.1-windows-x86_64\\x-pack\\plugins\\console_extensions\""}
{"type":"log","@timestamp":"2021-06-11T21:28:44+03:00","tags":["debug","plugins-discovery"],"pid":7360,"message":"Successfully discovered plugin \"crossClusterReplication\" at \"C:\\ELK2\\kibana-7.13.1-windows-x86_64\\x-pack\\plugins\\cross_cluster_replication\""}
{"type":"log","@timestamp":"2021-06-11T21:28:44+03:00","tags":["debug","plugins-discovery"],"pid":7360,"message":"Successfully discovered plugin \"dashboardEnhanced\" at \"C:\\ELK2\\kibana-7.13.1-windows-x86_64\\x-pack\\plugins\\dashboard_enhanced\""}
{"type":"log","@timestamp":"2021-06-11T21:28:44+03:00","tags":["debug","plugins-discovery"],"pid":7360,"message":"Successfully discovered plugin \"dataEnhanced\" at \"C:\\ELK2\\kibana-7.13.1-windows-x86_64\\x-pack\\plugins\\data_enhanced\""}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: path"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: csp"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: elasticsearch"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: externalUrl"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: logging"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: server"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: plugins"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: kibana"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: savedObjects"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: migrations"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: uiSettings"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: ops"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: status"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: pid"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","config"],"pid":11852,"message":"Marking config path as handled: i18n"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","root"],"pid":11852,"message":"setting up root"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","server"],"pid":11852,"message":"setting up server"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","environment"],"pid":11852,"message":"Resuming persistent Kibana instance UUID: 36c4068f-1d7b-4d4a-a3e2-5bcd8a5016ce"}
{"type":"log","@timestamp":"2021-06-11T21:29:13+03:00","tags":["debug","plugins-discovery"],"pid":11852,"message":"Discovering plugins..."}

```

I added a user in the security settings: I created keys with a username and password  
I did the following

> xpack.security.enabled: true  
> in elastic.yml

```auto
[elastic@node1 ~]$ ./elasticsearch/bin/elasticsearch-setup-passwords interactive
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y

Enter password for [elastic]:
Reenter password for [elastic]:
Enter password for [apm_system]:
Reenter password for [apm_system]:
Enter password for [kibana]:
Reenter password for [kibana]:
Enter password for [logstash_system]:
Reenter password for [logstash_system]:
Enter password for [beats_system]:
Reenter password for [beats_system]:
Enter password for [remote_monitoring_user]:
Reenter password for [remote_monitoring_user]:
Changed password for user [apm_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]

```

> [elastic@node1 ~]$ ./kibana/bin/kibana-keystore add elasticsearch.username  
> [elastic@node1 ~]$ ./kibana/bin/kibana-keystore add elasticsearch.password

After these actions everything broke, I want to configure the user to log in to the cab and then create roles, ELK I just installed

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [June 14, 2021, 2:21pm UTC](https://discuss.elastic.co/t/kibana-not-started-after-activated-xpack-security/275710/2 "2021-06-14T14:21:11Z")

</div>

there isn't any error or crash in those kibana logs? Can you look for others?  
This is a guide for minimal security: [Set up minimal security for Elasticsearch | Elasticsearch Guide [7.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-minimal-setup.html)

---

<div class="post-metadata">

**Author:** ![Ilya\_21bA](https://avatars.discourse-cdn.com/v4/letter/i/b77776/32.png) [@Ilya\_21bA](https://discuss.elastic.co/u/Ilya_21bA)\
**Post date:** [June 15, 2021, 8:16am UTC](https://discuss.elastic.co/t/kibana-not-started-after-activated-xpack-security/275710/3 "2021-06-15T08:16:43Z")

</div>

there are no errors, but it constantly restarts...

---

<div class="post-metadata">

**Author:** ![Ilya\_21bA](https://avatars.discourse-cdn.com/v4/letter/i/b77776/32.png) [@Ilya\_21bA](https://discuss.elastic.co/u/Ilya_21bA)\
**Post date:** [June 15, 2021, 8:21am UTC](https://discuss.elastic.co/t/kibana-not-started-after-activated-xpack-security/275710/4 "2021-06-15T08:21:02Z")

</div>

I suspect it's because Kibana can't see the elastic but I don't know why

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 16, 2021, 12:21am UTC](https://discuss.elastic.co/t/kibana-not-started-after-activated-xpack-security/275710/5 "2021-06-16T00:21:09Z")

</div>

Please show more of your logs, there's nothing in the section above that shows that it's restarting.

---

<div class="post-metadata">

**Author:** ![Ilya\_21bA](https://avatars.discourse-cdn.com/v4/letter/i/b77776/32.png) [@Ilya\_21bA](https://discuss.elastic.co/u/Ilya_21bA)\
**Post date:** [June 17, 2021, 2:01pm UTC](https://discuss.elastic.co/t/kibana-not-started-after-activated-xpack-security/275710/6 "2021-06-17T14:01:44Z")

</div>

he problem was solved, thank you for your help

---

<div class="post-metadata">

**Author:** ![Ilya\_21bA](https://avatars.discourse-cdn.com/v4/letter/i/b77776/32.png) [@Ilya\_21bA](https://discuss.elastic.co/u/Ilya_21bA)\
**Post date:** [June 17, 2021, 2:12pm UTC](https://discuss.elastic.co/t/kibana-not-started-after-activated-xpack-security/275710/7 "2021-06-17T14:12:52Z")

</div>

I solved this problem by creating users only for Elastic, I did not create the Kibana key store

---

<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:** [July 15, 2021, 2:13pm UTC](https://discuss.elastic.co/t/kibana-not-started-after-activated-xpack-security/275710/8 "2021-07-15T14:13:24Z")

</div>

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