【发布时间】:2018-05-21 21:11:41
【问题描述】:
我想让 SSL 与 Kafka 一起运行以使其更安全。我下载了Kafka并安装了它。我按照有关为 SSL 创建证书和信任库的说明进行操作,没有任何问题。 我将以下内容添加到我的 config/server.properties
ssl.enabled.protocols=TLSv1.2,TLSv1.1,TLSv1
ssl.keystore.type=JKS
ssl.truststore.type=JKS
listeners=PLAINTEXT://localhost:9092,SSL://localhost:9093
ssl.endpoint.identification.algorithm=HTTPS
security.inter.broker.protocol=SSL
ssl.secure.random.implementation=SHA1PRNG
ssl.endpoint.identification.algorithm=HTTPS
ssl.keystore.location=/home/ec2-user/workspace/kafka/cert/server.keystore.jks
ssl.key.password=<the password>
ssl.keystore.password=<the password>
ssl.truststore.location=/home/ec2-user/workspace/kafk/cert/server.truststore.jks
ssl.truststore.password=<the password>
启动 Zookeeper 后,我在启动 kafak 时收到此错误:[2017-12-07 16:02:52,155] 错误 [Controller id=0, targetBrokerId=0] Connection to node 0 failed authentication due to: SSL握手失败(org.apache.kafka.clients.NetworkClient)。 我必须终止任务才能停止此消息
看着logs/controller.log:
[Controller-0-to-broker-0-send-thread]: Controller 0's connection to broker localhost:9093 (id: 0 rack: null) was unsuccessful (kafka.controller.RequestSendThread)
您必须在端口 9093 上打开防火墙吗?
谢谢
【问题讨论】:
-
是的,有效:删除 ssl.endpoint.identification.algorithm=HTTPS 解决了它。谢谢!
标签: security ssl apache-kafka