# Error Enabling Encrypted Communication in ElasticSearch

**URL:** <https://discuss.elastic.co/t/error-enabling-encrypted-communication-in-elasticsearch/177132>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security, docker\
**Created:** [April 16, 2019, 5:37pm UTC](https://discuss.elastic.co/t/error-enabling-encrypted-communication-in-elasticsearch/177132 "2019-04-16T17:37:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leobaiano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leobaiano/32/43704_2.png) [@leobaiano](https://discuss.elastic.co/u/leobaiano)\
**Post date:** [April 16, 2019, 5:37pm UTC](https://discuss.elastic.co/t/error-enabling-encrypted-communication-in-elasticsearch/177132/1 "2019-04-16T17:37:52Z")

</div>

I'm using docker-compose and I've followed the documentation below to try to achieve my goals:

[https://www.elastic.co/guide/en/elasticsearch/reference/6.3/configuring-tls-docker.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/configuring-tls-docker.html)

After creating the certificates I run `docker-compose up` and receive the errors below:

```
elasticsearch | org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.core.XPackPlugin]

elasticsearch | Caused by: java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.core.XPackPlugin]

elasticsearch | ... 6 more
elasticsearch | Caused by: java.lang.reflect.InvocationTargetException

elasticsearch | ... 6 more
elasticsearch | Caused by: org.elasticsearch.ElasticsearchException: failed to initialize a TrustManagerFactory
elasticsearch | at org.elasticsearch.xpack.core.ssl.PEMTrustConfig.createTrustManager(PEMTrustConfig.java:48)

elasticsearch | ... 6 more
elasticsearch | Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config/certificates/ca/ca.crt

elasticsearch | ... 6 more
elasticsearch exited with code 1
```

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [April 19, 2019, 9:45am UTC](https://discuss.elastic.co/t/error-enabling-encrypted-communication-in-elasticsearch/177132/2 "2019-04-19T09:45:03Z")

</div>

Hi there,

any specific reason you want to use 6.3 which is rather old now and not 6.7 or 7.0 ?

The error seems quite obvious:

```auto
Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config/certificates/ca/ca.crt

```

are there any other errors in the output that would explain why the file is not created?

What does the instances.yml file that you have created in the previous step look like ?

---

<div class="post-metadata">

**Author:** ![leobaiano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leobaiano/32/43704_2.png) [@leobaiano](https://discuss.elastic.co/u/leobaiano)\
**Post date:** [April 20, 2019, 8:28pm UTC](https://discuss.elastic.co/t/error-enabling-encrypted-communication-in-elasticsearch/177132/3 "2019-04-20T20:28:34Z")

</div>

About the error I managed to resolve but did not see how to mark it resolved and close the topic.

The problem is that I was not sending the files to the volume.

```
volumes:
      - esdata01:/usr/share/elasticsearch/data
      - ./certs:$CERTS_DIR
```

---

<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:** [May 18, 2019, 8:28pm UTC](https://discuss.elastic.co/t/error-enabling-encrypted-communication-in-elasticsearch/177132/4 "2019-05-18T20:28:37Z")

</div>

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