Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kafka SSL handshake failed issue

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.

like image 755
Osman Jabri Avatar asked Dec 04 '18 13:12

Osman Jabri


People also ask

What does SSL handshake failed mean?

A TLS/SSL handshake failure occurs when a client and server cannot establish communication using the TLS/SSL protocol. When this error occurs in Apigee Edge, the client application receives an HTTP status 503 with the message Service Unavailable.

How does Kafka SSL work?

SSL Overview By default, Apache Kafka sends all data as clear text and without any authentication. First of all, we can configure SSL for encryption between the broker and the client. This, by default, requires one-way authentication using public key encryption where the client authenticates the server certificate.

What is SSL handshake?

The SSL or TLS handshake enables the SSL or TLS client and server to establish the secret keys with which they communicate. This section provides a summary of the steps that enable the SSL or TLS client and server to communicate with each other. Agree on the version of the protocol to use.


2 Answers

Just set ssl.endpoint.identification.algorithm= It can help you.

I.e with an empty value:

ssl.endpoint.identification.algorithm=
like image 31
macknight Avatar answered Sep 21 '22 20:09

macknight


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

like image 116
charlb Avatar answered Sep 22 '22 20:09

charlb