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

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": x509: certificate signed by unknown authority"

OS of container: Alpine linux 3.10

The command to create the docker container:

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?

Welcome to our community! :smiley:

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

Hi,
I have edited the post.

Did you follow the setup documentation for Configure security for the Elastic Stack | Elasticsearch Reference [7.12] | Elastic?

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.