Kafka Inter Broker SSL握手失败

时间:2019-05-17 13:39:52

标签: ssl apache-kafka

我正在尝试设置代理间SSL(而非客户端)身份验证,并不断看到以下错误:

[2019-05-17 06:33:47,151] INFO [Controller id=1004, targetBrokerId=1004] Failed authentication with /$IP (SSL handshake failed) (org.apache.kafka.common.network.Selector)
[2019-05-17 06:33:47,151] INFO [SocketServer brokerId=1004] Failed authentication with /$IP (SSL handshake failed) (org.apache.kafka.common.network.Selector)
[2019-05-17 06:33:47,151] ERROR [Controller id=1004, targetBrokerId=1004] Connection to node 1004 (/$IP:9093) failed authentication due to: SSL handshake failed (org.apache.kafka.clients.NetworkClient)

我的server.properties是:

listeners=PLAINTEXT://$IP:9092,SSL://$IP:9093
security.inter.broker.protocol=SSL
ssl.truststore.password=$PASS
ssl.keystore.password=$PASS
ssl.key.password=$PASS
ssl.endpoint.identification.algorithm=""
ssl.keystore.location=/etc/kafka/kafka.server.keystore.jks
ssl.truststore.location=/etc/kafka/kafka.server.truststore.jks
``

When I run `openssl s_client -debug -connect $IP:9093 -tls1` I get back a list of certificates and `Secure Renegotiation IS supported` 

Despite adding `-Djavax.net.debug=all` there's not anything in the logs which points to the problem. 

Kafka version 2.2

Any ideas?

1 个答案:

答案 0 :(得分:0)

我错误地设置了ssl.endpoint.identification.algorithm=""而不是ssl.endpoint.identification.algorithm"的值,从而解决了这个问题。

此值在2.2中已更改为默认值为https,因此将其设置为无效。