问题:
启动kafka时,出现以下错误提示:
ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentBrokerIdException: Configured broker.id 1 doesn’t match stored broker.id Some(0) in meta.properties. If you moved your data, make sure your configured broker.id matches. If you intend to create a new broker, you should remove all data in your data directories (log.dirs).
at kafka.server.KafkaServer.getOrGenerateBrokerId(KafkaServer.scala:793)
at kafka.server.KafkaServer.startup(KafkaServer.scala:221)
at kafka.Kafka$.main(Kafka.scala:109)
at kafka.Kafka.main(Kafka.scala)
原因:是因为我将 server.properties 文件中的broker.id 改了,导致我server.properties中的id和元数据中的id不一致。
解决方法:找到kafka中的meta.properties文件(我的是存放在kafkadatameta.properties.),将meta.properties中的broker.id改为和server.properties中的broker.id一致即可。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)