java 连接kafka超时_kafka发送消息的时候报超时,有人遇到过吗?
[root@node3 opt]# /opt/kafka/bin/kafka-console-consumer.sh --zookeeper 192.168.0.117:2181,192.168.0.118:2181,192.168.0.119:2181 --from-beginning --topic test1Exception in thread "main" org.I0Itec.zkcl
[root@node3 opt]# /opt/kafka/bin/kafka-console-consumer.sh --zookeeper 192.168.0.117:2181,192.168.0.118:2181,192.168.0.119:2181 --from-beginning --topic test1
Exception in thread "main" org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000
at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:880)
at org.I0Itec.zkclient.ZkClient.(ZkClient.java:98)
at org.I0Itec.zkclient.ZkClient.(ZkClient.java:84)
at kafka.consumer.ZookeeperConsumerConnector.connectZk(ZookeeperConsumerConnector.scala:156)
at kafka.consumer.ZookeeperConsumerConnector.(ZookeeperConsumerConnector.scala:114)
at kafka.consumer.ZookeeperConsumerConnector.(ZookeeperConsumerConnector.scala:128)
at kafka.consumer.Consumer$.create(ConsumerConnector.scala:89)
at kafka.consumer.ConsoleConsumer$.main(ConsoleConsumer.scala:178)
at kafka.consumer.ConsoleConsumer.main(ConsoleConsumer.scala)
我也遇到这个问题,网络确认是通的,kafka启动没有问题,创建topic,生产者连接也没有问题,消费者连接就报连接超时,请问你解决了吗?
更多推荐
所有评论(0)