当前位置:   article > 正文

kafka学习问题_timed out waiting for a node assignment. call: lis

timed out waiting for a node assignment. call: listtopics

查看topic列表报超时

报错如下:

  1. Error while executing topic command : Timed out waiting for a node assignment. Call: listTopics
  2. [2024-02-28 14:36:57,024] ERROR org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: listTopics
  3. (kafka.admin.TopicCommand$)

解决方法:修改server.properties文件中的listeners

listeners=PLAINTEXT://ip:9092

停止kafka运行:

bin/kafka-server-stop.sh 

重新启动kafka:

bin/kafka-server-start.sh -daemon config/server.properties

再次查看topic列表,发现如下报错:

  1. bin/kafka-topics.sh --bootstrap-server 192.168.15.187:9092 --list
  2. #报错内容
  3. [2024-02-28 14:57:22,420] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (/192.168.15.187:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

解决方法:修改server.properties文件中的advertised.listeners即可

advertised.listeners=PLAINTEXT://ip:9092
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/968655
推荐阅读
相关标签
  

闽ICP备14008679号