# Kibana error when enabling xpack security

**URL:** <https://discuss.elastic.co/t/kibana-error-when-enabling-xpack-security/322666>\
**Category:** Kibana\
**Created:** [January 7, 2023, 2:54pm UTC](https://discuss.elastic.co/t/kibana-error-when-enabling-xpack-security/322666 "2023-01-07T14:54:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![francis009](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/francis009/32/115680_2.png) [@francis009](https://discuss.elastic.co/u/francis009)\
**Post date:** [January 7, 2023, 2:54pm UTC](https://discuss.elastic.co/t/kibana-error-when-enabling-xpack-security/322666/1 "2023-01-07T14:54:53Z")

</div>

Hi, i've look through the forums and found many people having errors when enabling xpack, but not exactly my error, if i enable xpack on elasticsearch it pops up the log in when i access the website, but when i enable it in kibana it refuses to start the service.

Picture of the error:

 ![Captura de Ecrã (925)](https://us1.discourse-cdn.com/elastic/original/3X/7/a/7a4b33d6932232afb4621c3e05d845475c256b21.png)

My kibana.yml

 ![Captura de Ecrã (926)](https://us1.discourse-cdn.com/elastic/original/3X/7/4/748a6bd7b74ec5553e21df67ec76c524a3636293.png)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 7, 2023, 2:58pm UTC](https://discuss.elastic.co/t/kibana-error-when-enabling-xpack-security/322666/2 "2023-01-07T14:58:45Z")

</div>

There is nothing useful in the error log, you need to check in the system logs to see if there is more information.

But from your `kibana.yml` you have `elasticsearch.password` set twice, this won't work, you need to fix the `kibana.yml` and remove the duplicated entry.

---

<div class="post-metadata">

**Author:** ![francis009](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/francis009/32/115680_2.png) [@francis009](https://discuss.elastic.co/u/francis009)\
**Post date:** [January 7, 2023, 3:28pm UTC](https://discuss.elastic.co/t/kibana-error-when-enabling-xpack-security/322666/3 "2023-01-07T15:28:55Z")

</div>

Hi Leandro, i was following a tutorial and he also had duplicated entries and worked, since we were on the same version i thought it would work too, i will get rid one of the entries and get back to you asap.

---

<div class="post-metadata">

**Author:** ![francis009](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/francis009/32/115680_2.png) [@francis009](https://discuss.elastic.co/u/francis009)\
**Post date:** [January 7, 2023, 3:35pm UTC](https://discuss.elastic.co/t/kibana-error-when-enabling-xpack-security/322666/4 "2023-01-07T15:35:15Z")

</div>

So kibana service is running well but i am faced with an error page online:

 ![Captura de Ecrã (927)](https://us1.discourse-cdn.com/elastic/original/3X/b/f/bf8e14ad916a98d370f8704bf1899414f4f44c68.png)

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 7, 2023, 4:12pm UTC](https://discuss.elastic.co/t/kibana-error-when-enabling-xpack-security/322666/5 "2023-01-07T16:12:48Z")

</div>

> [@francis009](#):
>
> Hi Leandro, i was following a tutorial and he also had duplicated entries and worked

Which tutorial? Is a tutorial from Elastic? You can't have duplicate keys on a `yaml` file.

> [@francis009](#):
>
> So kibana service is running well but i am faced with an error page online

Kibana runs on port `5601`, not on port `8080`.

I recommend that you follow the official guide from [Elastic](https://www.elastic.co/guide/en/welcome-to-elastic/current/getting-started-general-purpose.html).

---

<div class="post-metadata">

**Author:** ![francis009](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/francis009/32/115680_2.png) [@francis009](https://discuss.elastic.co/u/francis009)\
**Post date:** [January 7, 2023, 4:15pm UTC](https://discuss.elastic.co/t/kibana-error-when-enabling-xpack-security/322666/6 "2023-01-07T16:15:09Z")

</div>

I was following this tutorial:  
https://www.youtube.com/embed/M06xdQorLfY?feature=oembed&wmode=opaque&list=PLB6hQ_WpB6U262YHVg5_cfYGSdlI6-it-

btw i am just gonna add what the kibana service status looks like

 ![Captura de Ecrã (928)](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b8d56609500e2eb09ee1f4779f94aedb2aa9d223.png)

It was running well on 8080 before.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 7, 2023, 4:20pm UTC](https://discuss.elastic.co/t/kibana-error-when-enabling-xpack-security/322666/7 "2023-01-07T16:20:10Z")

</div>

Just saw that you manually changed the port to use `8080`.

Have you tried to access using `http` or `https` ? You need to use `https://` not `http`.

---

<div class="post-metadata">

**Author:** ![francis009](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/francis009/32/115680_2.png) [@francis009](https://discuss.elastic.co/u/francis009)\
**Post date:** [January 7, 2023, 4:23pm UTC](https://discuss.elastic.co/t/kibana-error-when-enabling-xpack-security/322666/8 "2023-01-07T16:23:49Z")

</div>

I did change the port to 8080, turns out it was automatically filling the url with http and not https, it's working, thanks a lot.

 ![Captura de Ecrã (929)](https://us1.discourse-cdn.com/elastic/original/3X/9/7/97180bba3b81e853c6431ae1df285714e65a0324.png)

---

<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 4, 2023, 4:24pm UTC](https://discuss.elastic.co/t/kibana-error-when-enabling-xpack-security/322666/9 "2023-02-04T16:24:37Z")

</div>

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