No living connections error in kibana after enabling TLS/SSL

Hi Folks,

I think I might be missing something obvious but I am attempting to enable basic security on our Testing ELK Stack. enabling SSL on elasticsearch was successful. The certificate I am using is restricted to accept the following:
I have used certutil cert --ca {ca file path} --pem to create a certificate in pem format for Kibana and Logstash. The ca certificate does have a password.

I have set the hostname on kibana.yml to kibana.local with elasticsearch https://elastic.local:9200

I can connect using elastichead to this url and I can also connect using powershell
I have set the certificate settings in kibana.yml to
certificate (pem format) {filepath/instance.crt}
key {filepath/instance.key}
I have also created and added a kibana keystore for the credentials to connect to elasticsearch.

If I set the verification to None it connects ok but when using Certificate I get the error. This leads me to think it is a certificate issue but I don't know how to confirm suspicions.

Any advice or guidance would be much appreciated.

Which version of the Elastic stack are you using?

Is Logstash working?

Did you set elasticsearch.ssl.certificate and elasticsearch.ssl.key?

If you're still having trouble it might be helpful to post your kibana.yml and elasticsearch.yml files.

Hi Mattkime,

Thank you for your response.

I have not tried logstash just yet. I was getting kibana working so I can copy the config over.

I have set elasticsearch.ssl.certificate and .key without success. I do not have openssl available due to our security policy.

My Elasticsearch config is

bootstrap.memory_lock: false elasticsearch
http.port: 9200 true
node.ingest: true
node.master: true
node.max_local_storage_nodes: 1 elastic.local [elastic.local,local] elasticsearch\data
path.logs: elasticsearch\logs
transport.tcp.port: 9300
xpack.license.self_generated.type: basic true true certs/node-1.p12 certs/node-1.p12 true certs/node-1.p12 certs/node-1.p12
discovery.type: single-node

My Kibana config is "localhost"
elasticsearch.hosts: [""]
elasticsearch.preserveHost: true
server.ssl.enabled: true
server.ssl.certificate: 'certs\ca.crt'
server.ssl.key: 'certs\ca.key'
elasticsearch.ssl.certificateAuthorities: 'certs\cacert.pem'
elasticsearch.ssl.verificationMode: certificate
elasticsearch.logQueries: true
logging.dest: logs\kibana-logs.log
logging.verbose: true
logging.json: true true "32 character string"

If you set the verificationmode to none Kibana connects ok to Elasticsearch but when setting to certificate I see:

{"type":"log","@timestamp":"2019-08-27T23:56:24Z","tags":["warning","elasticsearch","admin"],"pid":11572,"message":"Unable to revive connection:"}
{"type":"log","@timestamp":"2019-08-27T23:56:24Z","tags":["warning","elasticsearch","admin"],"pid":11572,"message":"No living connections"}

It could something really simple but I cannot see it

I have now managed to convert the certificate to .pem which has allowed kibana to connect but now I am seeing the following error:

Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create, action_result: false", :backtrace=>nil}

What can cause this?

Ok so I am a bit further on now and I have encountered another error which seems to imply it is a java error. My Knowledge of Java is non existent and the error is:
[2019-08-29T13:38:43,822][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"https://logstash_internal:xxxxxx@elastic.local:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [https://logstash_internal:xxxxxx@elastic.local:9200/][Manticore::ClientProtocolException] PKIX path building failed: unable to find valid certification path to requested target"

The self signed certificate is installed in the trusted on the local machine. If you know what is causing the issue and how to resolve let me know.

my logstash config is

output {
elasticsearch {
hosts => ["https://elastic.local:9200"]
index => "logstash-%{+YYYY.MM.dd}"
ssl => true
keystore => '\config\logstash.keystore'
keystore_password => "keystore.pass"
cacert => '\config\certs\instance.crt'
ssl_certificate_verification => true
user => "{ES_USER}" password => "{ES_PWD}"
stdout { codec => rubydebug }


Thanks for the updates and I'm glad to see you're making progress. I will try to replicate the error you're seeing but it might take me a couple of days.

Hi Mattkime,

I have now managed to resolve the problem, To do this I browsed to the url in the error message:
https://logstash_internal:xxxxxx@elastic.local:9200/ and exported the certificate and pointed the cacert to the exported certificate which resolved the issue.

The documentation I had that step missing.

Thanks for your assistance in getting this resolved

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