kafka KRaft报advertised.listeners cannot contain any of controller.listener.names

啊啊 发表于: 2021-09-28   最后更新时间: 2021-10-01 20:39:09   73 游览

我使用kafka 3.0.0的KRaft模式,安装kafka集群,报:

ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
java.lang.IllegalArgumentException: requirement failed: advertised.listeners cannot contain any of controller.listener.names

错误详情:

[2021-09-28 09:51:05,813] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2021-09-28 09:51:06,259] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
[2021-09-28 09:51:06,339] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
java.lang.IllegalArgumentException: requirement failed: advertised.listeners cannot contain any of controller.listener.names
    at scala.Predef$.require(Predef.scala:337)
    at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:1967)
    at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1897)
    at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1394)
    at kafka.Kafka$.buildServer(Kafka.scala:67)
    at kafka.Kafka$.main(Kafka.scala:87)
    at kafka.Kafka.main(Kafka.scala)

我的server.properties配置如下:

listeners=PLAINTEXT://172.21.0.1:9092
process.roles=broker
controller.quorum.voters=172.21.0.1:9092,172.21.0.1:9093,172.21.0.1:9094
controller.listener.names=PLAINTEXT
advertised.listeners=PLAINTEXT://172.21.0.1:9092
inter.broker.listener.name=PLAINTEXT

请问我该如何解决?



添加评论

advertised.listeners cannot contain any of controller.listener.names
翻译:
adverted.listeners 不能包含任何 controller.listener.names

controller.listener.names的网口不能与外部的adverted.listeners一样,所以你需要删除advertised.listenersadvertised.listeners=PLAINTEXT://172.21.0.1:9092

你的答案

查看kafka相关的其他问题或提一个您自己的问题

找不到想要的答案?提一个您自己的问题。

我要提问
提问