Node to node encryption works, but NOT the HTTP client one

Hi there,

I have been trying to encrypt communication between the cluster nodes (this works like a charm), the browser and Kibana (works well too) and finally for the HTTP Client traffic. This latter does NOT work.

What I did so far:

  • Generated one PKCS12 certificate per node (3 in totals, 1 of them being a coordinating node only and also running Kibana)
  • Encryption works well with those certificates with the verification mode to full
  • Configured kibana.yml to make it point to https://my_coordinating_node

I keep getting those error messages:
{"type":"log","@timestamp":"2018-04-27T15:10:25Z","tags":["warning","elasticsearch","admin"],"pid":28466,"message":"Unable to revive connection:"}
{"type":"log","@timestamp":"2018-04-27T15:10:25Z","tags":["warning","elasticsearch","admin"],"pid":28466,"message":"No living connections"}

In the kibana.stdout log file but the kibana.stderr file remains empty.

I have a cluster of 3 nodes: 1 coordinating-only + kibana, 2 master/data

I tried so many variations, I am going crazy. Any ideas or leads would be more than welcome!

[ My elasticsearch.yml files ] eLABsticsearch client01 ( or elastic01 or elastic02 ) false ( or true for elastic01 and elastic02 )
node.master: false ( or true for elastic01 and elastic02 )
node.ingest: false false
search.remote.connect: false /var/lib/elasticsearch
path.logs: /var/log/elasticsearch ( or or )
http.port: 9200 ["",""]
discovery.zen.minimum_master_nodes: 1 full /etc/elasticsearch/${}.p12 /etc/elasticsearch/${}.p12 true /etc/elasticsearch/${}.p12 /etc/elasticsearch/${}.p12

[ My kibana.yml file ] ""
elasticsearch.url: ""
elasticsearch.username: "kibana"
elasticsearch.password: "********"
server.ssl.enabled: true
server.ssl.certificate: /etc/kibana/client01.crt
server.ssl.key: /etc/kibana/client01.key

You need to configure Kibana so that it can trust the certificate that Elasticsearch presents it when attempting to connect via http over TLS.
The p12 keystores that you have created with certutil ( I assume ) contain the certificate and private key for the instance, along with the CA certificate. That's why you use it both as a keystore and a truststore in your config. Unfortunately, Kibana doesn't currently support PKCS12 keystores so that you have to export the CA certificate to a pem encoded certificate and use that in your kibana configuration.

So in concrete steps:

  1. Export the CA certificate from the PKCS12 keystore

    openssl pkcs12 -in client01.p12 -cacerts -nokeys -out elastic-ca.pem
  2. Copy elastic-ca.pem to /etc/kibana/

  3. Configure kibana to trust this certificate authority by configuring

    elasticsearch.ssl.certificateAuthorities: [ "/etc/kibana/elastic-ca.pem" ]
  4. Restart Kibana


Wow Ionnnis, thank you soooo much. You made my day!!! I have been struggling with this for two days and was getting desperate.

I did create the p12 keystores with certutil indeed, but did not know kibana could not use it as-is.

Thanks again!

1 Like

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