在linux系统安装kafka时启动kafka报错
[2021-05-14 13:44:38,357] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
at kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected$3(ZooKeeperClient.scala:230)
出现这个问题主要是kafka的conf配置文件server.properties中,按照别人的教程来的把原来zookeeper.connect改成了具体的地址,其实不需要改动,就保持原样就行。zookeeper.connect=localhost:2181
在Kafka文件夹下执行bin/kafka-server-start.sh config/server.properties
出现以上红框的内容就说明kafka启动成功