赞
踩
报错如下:
- Error while executing topic command : Timed out waiting for a node assignment. Call: listTopics
- [2024-02-28 14:36:57,024] ERROR org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: listTopics
- (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列表,发现如下报错:
- bin/kafka-topics.sh --bootstrap-server 192.168.15.187:9092 --list
-
- #报错内容
- [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
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。