问题1:之前CDH集群安装过kafka,版本问题需要重新安装,导致现在的brokerid和之前的不一致。
Fatal error during KafkaServer startup. Prepare to shutdown
kafka.common.InconsistentBrokerIdException: Configured broker.id 477 doesn't match stored broker.id 472 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:624)
at kafka.server.KafkaServer.startup(KafkaServer.scala:201)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:43)
at kafka.Kafka$.main(Kafka.scala:92)
at com.cloudera.kafka.wrap.Kafka$.main(Kafka.scala:76)
at com.cloudera.kafka.wrap.Kafka.main(Kafka.scala)
解决:
1.1查看log.dirs所在位置 在kafka配置界面搜索 Data Directories
找到对应路径 /var/local/kafka/data
1.2.按着这个路径找到 meta.p