I have a wildcard certificate + key from letsencrypt.
These two files work fine with elasticsearch!
But when using these two files with Kibana, I get the error below and Kibana can't connect to elasticsearch:
Request error, retrying\nGET https://elasticsearch:9200/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip => unable to get local issuer certificate
Request error, retrying\nHEAD https://elasticsearch:9200/.apm-agent-configuration => unable to get local issuer certificate
Request error, retrying\nGET https://elasticsearch:9200/_xpack => unable to get local issuer certificate
Unable to revive connection: https://elasticsearch:9200/
No living connections
Here's my config right now:
Kibana docker-compose
kibana:
image: docker.elastic.co/kibana/kibana:7.6.0
hostname: kibana
environment:
- SERVER_NAME=kibana.mydomain.com
- ELASTICSEARCH_HOSTS=https://elasticsearch:9200
- SERVER_SSL_ENABLED=true
- SERVER_SSL_CERTIFICATE=/usr/share/kibana/config/certs/cert.pem
- SERVER_SSL_KEY=/usr/share/kibana/config/certs/key.pem
- ELASTICSEARCH_SSL_CERTIFICATE=/usr/share/kibana/config/certs/cert.pem
- ELASTICSEARCH_SSL_KEY=/usr/share/kibana/config/certs/key.pem
- ELASTICSEARCH_USERNAME=elastic
- ELASTICSEARCH_PASSWORD=elastic
- XPACK_MONITORING_UI_CONTAINER_ELASTICSEARCH_ENABLED=true
ports:
- 5601:5601
volumes:
- "/certs/:/usr/share/kibana/config/certs"
networks:
- ${DOCKER_NETWORK_NAME}
VerificationMode=none
I can add SSL_VERIFICATIONMODE=none and kibana works and connects to elasticsearch as expected.
Why can elasticsearch use these certs fine, but kibana is having a problem?
Extra info: Elasticsearch config that works
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.0
hostname: elasticsearch
environment:
- cluster.name=docker-cluster
- discovery.type=single-node
- network.host=0.0.0.0
- xpack.security.enabled=true
- xpack.security.transport.ssl.enabled=true
- xpack.security.transport.ssl.key=certs/key.pem
- xpack.security.transport.ssl.certificate=certs/cert.pem
- xpack.security.http.ssl.enabled=true
- xpack.security.http.ssl.key=certs/key.pem
- xpack.security.http.ssl.certificate=certs/cert.pem
- "ELASTIC_PASSWORD=${ELASTICSEARCH_PASSWORD}"
- "ES_JAVA_OPTS=${ELASTICSEARCH_JAVA_OPTS}"
Note that the above key.pem and cert.pem are exactly the same I'm trying to use with Kibana.