# Failed to start Elasticsearch

**URL:** <https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232>\
**Category:** Elasticsearch\
**Created:** [October 17, 2023, 3:35pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232 "2023-10-17T15:35:08Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![Tybe\_sacha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tybe_sacha/32/126600_2.png) [@Tybe\_sacha](https://discuss.elastic.co/u/Tybe_sacha)\
**Post date:** [October 20, 2023, 1:43pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232/21 "2023-10-20T13:43:20Z")

</div>

Hi everybody,

So I uninstall, clean all directories and reinstall Elastic Kibana.

Here is my conf :

```auto
root@srv-elk-ims-2:/usr/share/kibana/bin# ls -l /etc/elasticsearch/
total 56
drwxr-x--- 2 root elasticsearch 4096 Oct 19 14:16 certs
-rw-rw---- 1 root elasticsearch 1042 Sep 19 08:23 elasticsearch-plugins.example.yml
-rw-rw---- 1 root elasticsearch 536 Oct 19 14:16 elasticsearch.keystore
-rw-rw---- 1 root elasticsearch 4049 Oct 20 12:57 elasticsearch.yml
-rw-r----- 1 root elasticsearch 4058 Oct 19 15:04 elasticsearch.yml.backup
-rw-rw---- 1 root elasticsearch 2780 Sep 19 08:23 jvm.options
drwxr-s--- 2 root elasticsearch 4096 Sep 19 08:23 jvm.options.d
-rw-rw---- 1 root elasticsearch 17969 Sep 19 08:23 log4j2.properties
-rw-rw---- 1 root elasticsearch 473 Sep 19 08:23 role_mapping.yml
-rw-rw---- 1 root elasticsearch 197 Sep 19 08:23 roles.yml
-rw-rw---- 1 root elasticsearch 0 Oct 20 13:26 users
-rw-rw---- 1 root elasticsearch 0 Oct 20 13:26 users_roles

root@srv-elk-ims-2:/usr/share/kibana/bin# ls -l /etc/elasticsearch/certs/
total 24
-rw-rw---- 1 root elasticsearch 10045 Oct 19 14:16 http.p12
-rw-rw---- 1 root elasticsearch 1915 Oct 19 14:16 http_ca.crt
-rw-rw---- 1 root elasticsearch 5822 Oct 19 14:16 transport.p12

```

Here is my elasticsearch.yml :

```auto
# Enable security features
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["srv-elk-ims-2"]

# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0

# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0

```

I configured security with an enrollment token (so automatically I assume) and right now I can access my Kibana with [http://ipadress:5601](http://ipadress:5601)

What the official next step to configure https please ?

Do I need to follow this doc from beggining ?

> **[Set up basic security for the Elastic Stack plus secured HTTPS traffic |...](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-basic-setup-https.html)**

Thank you for your time, I sincerely appreciate it

---

<div class="post-metadata">

**Author:** ![grumo35](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grumo35/32/59451_2.png) [@grumo35](https://discuss.elastic.co/u/grumo35)\
**Post date:** [October 20, 2023, 1:57pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232/22 "2023-10-20T13:57:09Z")

</div>

Hi,

What you've done is a first nice step !

Yes ! The documentation you've send is really good and explain all the steps

- Encrypt Elastic client communication ( used when directly querying or clustering  
)
- Encrypt Kibana \<--\> Elasticsearch
- Encrypt Kibana \<--\> Client(s)

Enjoy !

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [October 20, 2023, 2:20pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232/23 "2023-10-20T14:20:36Z")

</div>

Hi @Tybe_sacha

So you're through the completion of the auto security setup! Excellent.

What you don't get with that is HTTPS between your browser and Kibana

No, you don't need to follow all the steps from the beginning. Everything is done except for HTTPS on Kibana 5601

[Encrypt traffic between your browser and Kibana](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-basic-setup-https.html#encrypt-kibana-browser) are the steps for that.

Of course if you do a self-signed cert which is okay ...your browser is going to complain... But that's okay, you're just going to need to accept it or this is where a publicly signed certificate would work better.

That's your choice.

---

<div class="post-metadata">

**Author:** ![Tybe\_sacha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tybe_sacha/32/126600_2.png) [@Tybe\_sacha](https://discuss.elastic.co/u/Tybe_sacha)\
**Post date:** [October 20, 2023, 2:23pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232/24 "2023-10-20T14:23:42Z")

</div>

Hi grumo35,

Thank you for being that fast ! 😄

So to resume :

- Encrypt Elastic client communication : _already done automatically with enrollment token_
- Encrypt Kibana \<--\> Elasticsearch :

```auto
Copy the elasticsearch-ca.pem file to the Kibana configuration directory, as defined by the $KBN_PATH_CONF path.
Open kibana.yml and add the following line to specify the location of the security certificate for the HTTP layer.

elasticsearch.ssl.certificateAuthorities: $KBN_PATH_CONF/elasticsearch-ca.pem

```

I don't have any \*.pem file ... Is this normal ?

And then :

- Encrypt Kibana \<--\> Client(s)

---

<div class="post-metadata">

**Author:** ![Tybe\_sacha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tybe_sacha/32/126600_2.png) [@Tybe\_sacha](https://discuss.elastic.co/u/Tybe_sacha)\
**Post date:** [October 20, 2023, 2:27pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232/25 "2023-10-20T14:27:01Z")

</div>

Hi Stephen,

Thank you too to reply 😃

Ok so I'm reading the documentation and at the beggining it says :

```auto
You create a server certificate and private key for Kibana. Kibana uses this server certificate and corresponding private key when receiving connections from web browsers.

```

Where the certificate is supposed to be ?

Cause I don't have any in /usr/share/kibana

---

<div class="post-metadata">

**Author:** ![grumo35](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grumo35/32/59451_2.png) [@grumo35](https://discuss.elastic.co/u/grumo35)\
**Post date:** [October 20, 2023, 2:27pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232/26 "2023-10-20T14:27:07Z")

</div>

As @stephenb said you might be good for the two first part of the tutorial,

you could just follow through starting from here :  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/security-basic-setup-https.html#encrypt-kibana-browser](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-basic-setup-https.html#encrypt-kibana-browser)

---

<div class="post-metadata">

**Author:** ![grumo35](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grumo35/32/59451_2.png) [@grumo35](https://discuss.elastic.co/u/grumo35)\
**Post date:** [October 20, 2023, 2:29pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232/27 "2023-10-20T14:29:22Z")

</div>

> - Encrypt Kibana \<--\> Elasticsearch :

I want to point out that you can easily check if the communication is already secure looking at your Kibana configuration ( it should point on https elastic endpoint )

Also just keep in mind that Kibana is basically just a web server that need a key and a certificate to be able to talk to client using https.

Sooo you really just have to generate those starting with

**Generate a server certificate and private key for Kibana.**

`./bin/elasticsearch-certutil csr -name kibana-server -dns example.com,www.example.com`

---

<div class="post-metadata">

**Author:** ![Tybe\_sacha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tybe_sacha/32/126600_2.png) [@Tybe\_sacha](https://discuss.elastic.co/u/Tybe_sacha)\
**Post date:** [November 8, 2023, 2:23pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232/28 "2023-11-08T14:23:01Z")

</div>

Hi everybody, thank you very much for your time.

My project had to be stopped but your answers helped me a lot to understand how Elastic, Kibana, encryption work.

Have a good day 😃

---

<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:** [December 6, 2023, 2:23pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232/29 "2023-12-06T14:23:26Z")

</div>

Closed on December 6, 2023, 2:23pm UTC

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

[Previous page](https://discuss.elastic.co/t/failed-to-start-elasticsearch/345232.md?page=1)
