我使用kafka 3.0.0的KRaft模式,安装kafka集群,报:
RROR Exiting Kafka due to fatal exception (kafka.Kafka$)
org.apache.kafka.common.config.ConfigException: If using process.roles, controller.quorum.voters must contain a parseable set of voters.
错误详情:
[2021-09-28 07:22:10,044] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2021-09-28 07:22:10,484] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
[2021-09-28 07:22:10,530] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
org.apache.kafka.common.config.ConfigException: If using process.roles, controller.quorum.voters must contain a parseable set of voters.
at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:1920)
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配置如下:
process.roles=broker,controller
请问我该如何解决?
你缺少了controller.quorum.voters配置:
参考来自:Kafka Broker配置
例如:
controller.quorum.voters=1@172.21.0.1:9092,2@172.21.0.1:9093,3@172.21.0.1:9094
你的答案