# Elastic logging plugin doesn’t work with self-signed certificate

**URL:** <https://discuss.elastic.co/t/elastic-logging-plugin-doesn-t-work-with-self-signed-certificate/268406>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [March 25, 2021, 7:32pm UTC](https://discuss.elastic.co/t/elastic-logging-plugin-doesn-t-work-with-self-signed-certificate/268406 "2021-03-25T19:32:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nvb97](https://avatars.discourse-cdn.com/v4/letter/n/5f8ce5/32.png) [@nvb97](https://discuss.elastic.co/u/nvb97)\
**Post date:** [March 25, 2021, 7:32pm UTC](https://discuss.elastic.co/t/elastic-logging-plugin-doesn-t-work-with-self-signed-certificate/268406/1 "2021-03-25T19:32:06Z")

</div>

Hi all,

I have installed Elastic Logging Plugin for Docker (v.7.11.1) which should send the data to Elasticsearch where the security is enabled, but the log events from the docker container don’t arrive in elastic index.

> **Error:**  
> “Failed to connect to backoff …: Get "[https://hostname:9200](https://hostname:9200)": x509: certificate signed by unknown authority"

OS of container: Alpine linux 3.10

The command to create the docker container:

```auto
docker run -d [...]
--log-driver=elastic/elastic-logging-plugin:7.11.1
--log-opt hosts="https://hostname:9200" 
--log-opt username="elastic" 
--log-opt password="password" 
--log-opt ssl="true" 
--log-opt index="elastic-log-docker-%{+yyyy.MM.dd}"

```

With the security disabled the error is not present and logs arrived correctly.

Could you give me some suggestions, please? How can I set up the certificate for the connection?

---

<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:** [March 26, 2021, 12:29am UTC](https://discuss.elastic.co/t/elastic-logging-plugin-doesn-t-work-with-self-signed-certificate/268406/2 "2021-03-26T00:29:15Z")

</div>

Welcome to our community! 😃

Can you please edit your post and fix the formatting, it's really hard to read at the moment.

---

<div class="post-metadata">

**Author:** ![nvb97](https://avatars.discourse-cdn.com/v4/letter/n/5f8ce5/32.png) [@nvb97](https://discuss.elastic.co/u/nvb97)\
**Post date:** [March 26, 2021, 10:39am UTC](https://discuss.elastic.co/t/elastic-logging-plugin-doesn-t-work-with-self-signed-certificate/268406/3 "2021-03-26T10:39:16Z")

</div>

Hi,  
I have edited the post.

---

<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:** [March 29, 2021, 12:02am UTC](https://discuss.elastic.co/t/elastic-logging-plugin-doesn-t-work-with-self-signed-certificate/268406/4 "2021-03-29T00:02:27Z")

</div>

> [@nvb97](#):
>
> Could you give me some suggestions, please? How can I set up the certificate for the connection?

Did you follow the setup documentation for [Start the Elastic Stack with security enabled automatically | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-stack-security.html)?

---

<div class="post-metadata">

**Author:** ![nvb97](https://avatars.discourse-cdn.com/v4/letter/n/5f8ce5/32.png) [@nvb97](https://discuss.elastic.co/u/nvb97)\
**Post date:** [April 13, 2021, 10:05am UTC](https://discuss.elastic.co/t/elastic-logging-plugin-doesn-t-work-with-self-signed-certificate/268406/5 "2021-04-13T10:05:41Z")

</div>

Yes, I followed this documentation.  
For the connection from other parts (browser, agent) the https works and the certificates have been set up.  
It seems to be problem of the docker plugin, which doesn't receive the configuration correctly.

---

<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 11, 2021, 10:06am UTC](https://discuss.elastic.co/t/elastic-logging-plugin-doesn-t-work-with-self-signed-certificate/268406/6 "2021-05-11T10:06:39Z")

</div>

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