我在ubuntu 20.04上安装了最新版本的kafka,当我试图创建一个主题时,出现了以下错误:
~/Kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic TutorialTopic
Exception in thread "main" kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
at kafka.zookeeper.ZooKeeperClient.waitUntilConnected(ZooKeeperClient.scala:271)
at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:125)
at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1948)
at kafka.admin.TopicCommand$ZookeeperTopicService$.apply(TopicCommand.scala:378)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:56)
at kafka.admin.TopicCommand.main(TopicCommand.scala)```
i tried :
- to modify zookeeper timeout connection time to 18000->60000
- change zookeeper localhost:2181 to zookeeper zookeeper:2181
but still same issue, do you know why please ?
暂无答案!
目前还没有任何答案,快来回答吧!