# Xpack.security.transport.ssl setup issue

**URL:** <https://discuss.elastic.co/t/xpack-security-transport-ssl-setup-issue/313757>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [September 6, 2022, 7:43am UTC](https://discuss.elastic.co/t/xpack-security-transport-ssl-setup-issue/313757 "2022-09-06T07:43:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheching](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cheching](https://discuss.elastic.co/u/cheching)\
**Post date:** [September 6, 2022, 7:43am UTC](https://discuss.elastic.co/t/xpack-security-transport-ssl-setup-issue/313757/1 "2022-09-06T07:43:32Z")

</div>

Hi Team,

Need yours assist to look into below issue, I'm using self hosted Kibana & Elasticsearch as well. But I have an error after I generated the certificates and copy it into the etc/elasticsearch/certs path. And after I configured the elasticsearch.yml file, Elasticsearch were unable to start. Below is my configuration in the elasticsearch.yml and the error logs. Appreciated if you could help on this. Thanks again

elasticsearch.yml

xpack.security.transport.ssl:  
enabled: true  
verification\_mode: certificate  
client\_authentication: required  
keystore.path: certs/elastic-certificates.p12  
truststore.path: certs/elastic-certificates.p12

Error logs from journalctl -xeu elasticsearch.service

Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: uncaught exception in thread [main]  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: org.elasticsearch.ElasticsearchSecurityException: failed to load SSL configuration [\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: Likely root cause: java.nio.file.AccessDeniedException: /etc/elasticsearch/certs/ela\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.j\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.jav\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.jav\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystem\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.nio.file.Files.newByteChannel(Files.java:380)  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.nio.file.Files.newByteChannel(Files.java:432)  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemP\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.nio.file.Files.newInputStream(Files.java:160)  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.common.ssl.KeyStoreUtil.readKeyStore(KeyStoreUtil.java:\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.common.ssl.StoreTrustConfig.readKeyStore(StoreTrustConf\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.common.ssl.StoreTrustConfig.createTrustManager(StoreTru\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.xpack.core.ssl.SSLService.createSslContext(SSLService.j\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1220)  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.xpack.core.ssl.SSLService.lambda$loadSslConfigurations$\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.util.HashMap.forEach(HashMap.java:1421)  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.util.Collections$UnmodifiableMap.forEach(Collections.java:\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.xpack.core.ssl.SSLService.loadSslConfigurations(SSLServ\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.xpack.core.ssl.SSLService.(SSLService.java:156)  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.xpack.core.XPackPlugin.createSSLService(XPackPlugin.jav\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.xpack.core.XPackPlugin.createComponents(XPackPlugin.jav\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.node.Node.lambda$new$16(Node.java:662)  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Array\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.jav\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipel\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOp\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.jav\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.ja\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.node.Node.(Node.java:676)  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: at org.elasticsearch.node.Node.(Node.java:277)  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: \<\<\>\>  
Sep 06 14:31:54 kibana-virtual-machine systemd-entrypoint[7328]: For complete error details, refer to the log at /var/log/elasticsearch/mims-lab.log  
Sep 06 14:31:54 kibana-virtual-machine systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [September 6, 2022, 7:45am UTC](https://discuss.elastic.co/t/xpack-security-transport-ssl-setup-issue/313757/2 "2022-09-06T07:45:49Z")

</div>

> [@cheching](#):
>
> xpack.security.transport.ssl:  
> enabled: true

This should be like:

```auto
xpack.security.transport.ssl.enabled: true

```

---

<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:** [September 6, 2022, 7:54am UTC](https://discuss.elastic.co/t/xpack-security-transport-ssl-setup-issue/313757/3 "2022-09-06T07:54:29Z")

</div>

Please format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂

> [@cheching](#):
>
> Likely root cause: java.nio.file.AccessDeniedException: /etc/elasticsearch/certs

Check that as well please.

---

<div class="post-metadata">

**Author:** ![cheching](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cheching](https://discuss.elastic.co/u/cheching)\
**Post date:** [September 7, 2022, 2:50am UTC](https://discuss.elastic.co/t/xpack-security-transport-ssl-setup-issue/313757/4 "2022-09-07T02:50:09Z")

</div>

Hi Sir,

Thanks for your replied, I think I've solved the issue of the certs. But there another outcome issue after that-  
(Likely root cause: java.nio.file.AccessDeniedException: /etc/elasticsearch/elasticsearch.keystore.tmp)

I'm not really familiar on this, appreciate if you could help on this. Would like to let you know I'm configuring the alerting and action settings in Kibana, but unfortunately I've encountered some of the errors.

Thanks again

---

<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:** [October 5, 2022, 2:50am UTC](https://discuss.elastic.co/t/xpack-security-transport-ssl-setup-issue/313757/5 "2022-10-05T02:50:36Z")

</div>

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