在这里使用快速启动
https://kafka.apache.org/quickstart我遵循步骤,但当我执行
bin/kafka-topics.sh --list --bootstrap-server localhost:9092我得到:
Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.我将列表命令更改为
bin/kafka-topics.sh -列表--动物园管理员本地主机:2181
效果很好。
我试着做这些样本
https://github.com/spring-projects/spring-kafka/tree/master/samples不工作,我得到:
org.springframework.kafka.KafkaException: Timed out waiting to get existing topics; nested exception is java.util.concurrent.TimeoutException这种情况发生在公司/公司的笔记本电脑上。
我在我的专用macos (塞拉利昂)上使用相同的步骤
bin/kafka-topics.sh --list --bootstrap-server localhost:9092它工作得很好,所有的春季样品也都能工作。
在不工作的机器上:
我试着用卡夫卡列出的IP
[2020-02-28 14:12:31,202] WARN [Controller id=0, targetBrokerId=0] Connection to node 0 (/92.242.132.25:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)就像这个没有帮助的--bootstrap-server 92.242.132.25:9092
顺便说一下,ip地址(92.242.132.25)与我从ifconfig获得的地址不一样,即:
192.168.1.35我两次都试了但没帮上忙。
然而,telnet localhost 9092确实连接。
--bootstrap-server localhost:9092不能工作?,企业的mac-os有一些限制(防火墙等等)可以导致这一点?请求支持,他们拒绝了。
发布于 2020-02-28 22:52:21
如果您只需要使用本地运行的Kafka来进行开发,那么在Docker上的汇合平台更容易启动和运行,请参阅https://docs.confluent.io/current/quickstart/ce-docker-quickstart.html
https://stackoverflow.com/questions/60456155
复制相似问题