Logstash TLS Cert JKS to PKCS8 Invalid Key Error Logstash TLS Cert JKS to PKCS8 Invalid Key Error elasticsearch elasticsearch

Logstash TLS Cert JKS to PKCS8 Invalid Key Error


The cause of this error:

ERROR logstash.inputs.beats - Looks like you either have an invalid key or your private key was not in PKCS8 format.{:exception=>java.lang.IllegalArgumentException: File does not contain valid private key: /ELK/logstash/SSL/p8key.pem}

is because ssl_key_passphrase => "password" was not set in the logstash input.

And this error:

ERROR org.logstash.beats.BeatsHandler - Exception: not an SSL/TLS record

is because non-SSL/TLS traffic was attempting to go through the SSL/TLS port. In this case, the culprit was filebeat.

https://www.elastic.co/guide/en/x-pack/current/security-troubleshooting.html