Kafka Configured broker.id 2 doesn't match stored broker.id 1 in meta.properties.

Kafka kafka.common.InconsistentBrokerIdException: Configured broker.id 2 doesn't match stored broker.id 1 in meta.properties. 

[2019-01-16 19:15:38,663] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentBrokerIdException: Configured broker.id 2 doesn't match stored broker.id 1 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.getBrokerIdAndOfflineDirs(KafkaServer.scala:673)
	at kafka.server.KafkaServer.startup(KafkaServer.scala:209)
	at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
	at kafka.Kafka$.main(Kafka.scala:92)
	at kafka.Kafka.main(Kafka.scala)
[2019-01-16 19:15:38,668] INFO shutting down (kafka.server.KafkaServer)
[2019-01-16 19:15:38,672] WARN  (kafka.utils.CoreUtils$)
java.lang.NullPointerException
	at kafka.server.KafkaServer.$anonfun$shutdown$6(KafkaServer.scala:569)
	at kafka.utils.CoreUtils$.swallow(CoreUtils.scala:85)
	at kafka.server.KafkaServer.shutdown(KafkaServer.scala:569)
	at kafka.server.KafkaServer.startup(KafkaServer.scala:326)
	at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
	at kafka.Kafka$.main(Kafka.scala:92)
	at kafka.Kafka.main(Kafka.scala)
[2019-01-16 19:15:38,678] INFO [ZooKeeperClient] Closing. (kafka.zookeeper.ZooKeeperClient)
[2019-01-16 19:15:38,690] INFO Session: 0x1000005cd770006 closed (org.apache.zookeeper.ZooKeeper)
[2019-01-16 19:15:38,693] INFO EventThread shut down for session: 0x1000005cd770006 (org.apache.zookeeper.ClientCnxn)
[2019-01-16 19:15:38,694] INFO [ZooKeeperClient] Closed. (kafka.zookeeper.ZooKeeperClient)
[2019-01-16 19:15:38,705] INFO shut down completed (kafka.server.KafkaServer)
[2019-01-16 19:15:38,707] ERROR Exiting Kafka. (kafka.server.KafkaServerStartable)
[2019-01-16 19:15:38,714] INFO shutting down (kafka.server.KafkaServer)

看到broker.id 时 才意识到broker.id 没有配好

broker.id 出现在两个配置文件中(两个文件中的broker.id 要一致):

1.server.properties

2.meta.properties

在克隆虚拟机后只修改了server.properties而忘记修改meta.properties

你可能感兴趣的:(大数据,kafka,kafka)