Kafka SSL handshake failed issue

Osman Jabri picture Osman Jabri · Dec 4, 2018 · Viewed 17.8k times · Source

I am trying to enable SSL Authentication on my Kafka server. I am following 7.2 section in the Kafka documentation.

Followed all steps, but while calling the producer.bat file to send data in to the topic i get below error.

ERROR [Producer clientId=console-producer] Connection to node -1 failed authentication due to: SSL handshake failed (org.apache.kafka.clients.NetworkClient)

Caused by: java.security.cert.CertificateException: No name matching localhost found

I did create the certificate with CN=localhost.

Answer

charlb picture charlb · Dec 10, 2018

The server host name verification may be disabled by setting ssl.endpoint.identification.algorithm to an empty string on the client.