我正在尝试在我的 Kafka 服务器上启用 SSL 身份验证。我正在关注 7.2 section in the Kafka documentation .
已执行所有步骤,但在调用 producer.bat 文件以将数据发送到主题时出现以下错误。
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
我确实使用 CN=localhost
创建了证书。
最佳答案
可以通过在客户端将 ssl.endpoint.identification.algorithm
设置为空字符串来禁用服务器主机名验证。
关于ssl - Kafka SSL 握手失败问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53614443/