# Fatal exception while booting Elasticsearchorg.elasticsearch.ElasticsearchSecurityException: failed to load SSL configuration \[xpack.security.transport.ssl\] - cannot read configured \[PKCS12\] keystore

**URL:** <https://discuss.elastic.co/t/fatal-exception-while-booting-elasticsearchorg-elasticsearch-elasticsearchsecurityexception-failed-to-load-ssl-configuration-xpack-security-transport-ssl-cannot-read-configured-pkcs12-keystore/349427>\
**Category:** Elasticsearch\
**Created:** [December 15, 2023, 7:45am UTC](https://discuss.elastic.co/t/fatal-exception-while-booting-elasticsearchorg-elasticsearch-elasticsearchsecurityexception-failed-to-load-ssl-configuration-xpack-security-transport-ssl-cannot-read-configured-pkcs12-keystore/349427 "2023-12-15T07:45:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![9631](https://avatars.discourse-cdn.com/v4/letter/9/22d042/32.png) [@9631](https://discuss.elastic.co/u/9631)\
**Post date:** [December 15, 2023, 7:45am UTC](https://discuss.elastic.co/t/fatal-exception-while-booting-elasticsearchorg-elasticsearch-elasticsearchsecurityexception-failed-to-load-ssl-configuration-xpack-security-transport-ssl-cannot-read-configured-pkcs12-keystore/349427/1 "2023-12-15T07:45:28Z")

</div>

```auto
[2023-12-15T12:36:37,084][ERROR][o.e.b.Elasticsearch] [LAPTOP-ECGDD83N] fatal exception while booting Elasticsearchorg.elasticsearch.ElasticsearchSecurityException: failed to load SSL configuration [xpack.security.transport.ssl] - cannot read configured [PKCS12] keystore [D:\Internship_task\elasticsearch\elasticsearch-8.9.0\config\elastic-certificates.p12] - this is usually caused by an incorrect password
        at org.elasticsearch.xcore@8.9.0/org.elasticsearch.xpack.core.ssl.SSLService.lambda$loadSslConfigurations$11(SSLService.java:617)
        at java.base/java.util.HashMap.forEach(HashMap.java:1429)
        at java.base/java.util.Collections$UnmodifiableMap.forEach(Collections.java:1553)
        at org.elasticsearch.xcore@8.9.0/org.elasticsearch.xpack.core.ssl.SSLService.loadSslConfigurations(SSLService.java:613)
        at org.elasticsearch.xcore@8.9.0/org.elasticsearch.xpack.core.ssl.SSLService.<init>(SSLService.java:159)

See logs for more details.

ERROR: Elasticsearch did not exit normally - check the logs at D:\Internship_task\elasticsearch\elasticsearch-8.9.0\logs\rivan.log

ERROR: Elasticsearch exited unexpectedly

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 15, 2023, 8:19am UTC](https://discuss.elastic.co/t/fatal-exception-while-booting-elasticsearchorg-elasticsearch-elasticsearchsecurityexception-failed-to-load-ssl-configuration-xpack-security-transport-ssl-cannot-read-configured-pkcs12-keystore/349427/2 "2023-12-15T08:19:52Z")

</div>

Did you read the error message?

> failed to load SSL configuration [xpack.security.transport.ssl] - cannot read configured [PKCS12] keystore [D:\Internship\_task\elasticsearch\elasticsearch-8.9.0\config\elastic-certificates.p12] - this is usually caused by an incorrect password

BTW use 8.11. It's more recent and contains a lot of bug fixes.

---

<div class="post-metadata">

**Author:** ![9631](https://avatars.discourse-cdn.com/v4/letter/9/22d042/32.png) [@9631](https://discuss.elastic.co/u/9631)\
**Post date:** [December 15, 2023, 9:23am UTC](https://discuss.elastic.co/t/fatal-exception-while-booting-elasticsearchorg-elasticsearch-elasticsearchsecurityexception-failed-to-load-ssl-configuration-xpack-security-transport-ssl-cannot-read-configured-pkcs12-keystore/349427/3 "2023-12-15T09:23:29Z")

</div>

Could you please explain me

this is my , elasticsearch.yml

```auto
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

xpack.security.http.ssl:
  enabled: true
  verification_mode: certificate
  keystore.type: PKCS12
  keystore.path: elastic-certificates.p12
  truststore.path: elastic-certificates.p12
 
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  client_authentication: required
  keystore.type: PKCS12
  keystore.path: elastic-certificates.p12
  
  truststore.type: PKCS12
  truststore.path: elastic-certificates.p12

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 15, 2023, 9:38am UTC](https://discuss.elastic.co/t/fatal-exception-while-booting-elasticsearchorg-elasticsearch-elasticsearchsecurityexception-failed-to-load-ssl-configuration-xpack-security-transport-ssl-cannot-read-configured-pkcs12-keystore/349427/4 "2023-12-15T09:38:20Z")

</div>

Did you set `xpack.security.ssl.keystore.secure_password`?

It's a [secured setting](https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-settings.html).

If you did not, please read the complete guide at: [Set up basic security for the Elastic Stack plus secured HTTPS traffic | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-basic-setup-https.html)

---

<div class="post-metadata">

**Author:** ![9631](https://avatars.discourse-cdn.com/v4/letter/9/22d042/32.png) [@9631](https://discuss.elastic.co/u/9631)\
**Post date:** [December 15, 2023, 10:05am UTC](https://discuss.elastic.co/t/fatal-exception-while-booting-elasticsearchorg-elasticsearch-elasticsearchsecurityexception-failed-to-load-ssl-configuration-xpack-security-transport-ssl-cannot-read-configured-pkcs12-keystore/349427/5 "2023-12-15T10:05:01Z")

</div>

Yes, I have done that as well and could able to see the password and given the permissions as well.

```auto
D:\Internship_task\elasticsearch\elasticsearch-8.9.0\bin>elasticsearch-keystore list
keystore.seed
xpack.security.http.ssl.keystore.secure_password
xpack.security.http.ssl.truststore.secure_password
xpack.security.transport.ssl.keystore.secure_password
xpack.security.transport.ssl.truststore.secure_password

```

```auto
D:\Internship_task\elasticsearch\elasticsearch-8.9.0\bin>elasticsearch-keystore show xpack.security.http.ssl.keystore.secure_password

```

```auto
D:\Internship_task\elasticsearch\elasticsearch-8.9.0\bin>keytool -list -keystore "D:\Internship_task\elasticsearch\elasticsearch-8.9.0\config\elastic-certificates.p12"
Enter keystore password:
Keystore type: PKCS12
Keystore provider: SUN

Your keystore contains 2 entries

D:\Internship_task\elasticsearch\elasticsearch-8.9.0\config\elastic-certificates.p12 NT AUTHORITY\Authenticated Users:(F)
                                                                                     BUILTIN\Administrators:(I)(F)
                                                                                     NT AUTHORITY\SYSTEM:(I)(F)
                                                                                     NT AUTHORITY\Authenticated Users:(I)(M)
                                                                                     BUILTIN\Users:(I)(RX)

Successfully processed 1 files; Failed processing 0 files

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 15, 2023, 10:28am UTC](https://discuss.elastic.co/t/fatal-exception-while-booting-elasticsearchorg-elasticsearch-elasticsearchsecurityexception-failed-to-load-ssl-configuration-xpack-security-transport-ssl-cannot-read-configured-pkcs12-keystore/349427/6 "2023-12-15T10:28:17Z")

</div>

Please don't format ALL the text with code format, but just the code part.

I'm editing your post.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 15, 2023, 10:32am UTC](https://discuss.elastic.co/t/fatal-exception-while-booting-elasticsearchorg-elasticsearch-elasticsearchsecurityexception-failed-to-load-ssl-configuration-xpack-security-transport-ssl-cannot-read-configured-pkcs12-keystore/349427/7 "2023-12-15T10:32:53Z")

</div>

I'm afraid I don't have enough knowledge on this topic to assist here. May be someone else will be able to answer.

My advice for now:

- Try to do the same thing using the latest 8.11 version
- Follow the guide step by step
- If anything goes wrong with one of the steps, please report it here

I did not check the list of bugs fixed since 8.9.0 but may be there's something related?

---

<div class="post-metadata">

**Author:** ![9631](https://avatars.discourse-cdn.com/v4/letter/9/22d042/32.png) [@9631](https://discuss.elastic.co/u/9631)\
**Post date:** [December 15, 2023, 10:58am UTC](https://discuss.elastic.co/t/fatal-exception-while-booting-elasticsearchorg-elasticsearch-elasticsearchsecurityexception-failed-to-load-ssl-configuration-xpack-security-transport-ssl-cannot-read-configured-pkcs12-keystore/349427/8 "2023-12-15T10:58:50Z")

</div>

Sorry for making you trouble and will follow the above suggestion that you mentioned.

---

<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:** [January 12, 2024, 10:58am UTC](https://discuss.elastic.co/t/fatal-exception-while-booting-elasticsearchorg-elasticsearch-elasticsearchsecurityexception-failed-to-load-ssl-configuration-xpack-security-transport-ssl-cannot-read-configured-pkcs12-keystore/349427/9 "2024-01-12T10:58:53Z")

</div>

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