在Windows中运行Kafka时出错:未为侦听器HTTP定义安全协议

时间:2019-06-12 10:06:30

标签: apache-kafka

使用以下链接,我尝试在Windows Setting Up and Running Apache Kafka on Windows OS中运行kafka

当我尝试运行命令

时,我可以无任何错误地运行zookeeper
.\bin\windows\kafka-server-start.bat .\config\server.properties

我遇到以下错误

 ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
 java.lang.IllegalArgumentException: Error creating broker listeners
 from 'http://localhost:9092': No security protocol defined for
 listener HTTP
         at kafka.utils.CoreUtils$.listenerListToEndPoints(CoreUtils.scala:312)
         at kafka.server.KafkaConfig.advertisedListeners(KafkaConfig.scala:1334)
         at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:1396)
         at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1374)
         at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1063)
         at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:1043)
         at kafka.server.KafkaServerStartable$.fromProps(KafkaServerStartable.scala:28)
         at kafka.Kafka$.main(Kafka.scala:59)
         at kafka.Kafka.main(Kafka.scala)

请指导我解决上述问题

谢谢

1 个答案:

答案 0 :(得分:0)

通过执行以下操作,我能够解决所陈述的错误

  1. 我重新安装了Kafka
  2. 我确保Java的环境路径指向64,但仅VM。