org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server
异常情况:[henry@hadoop102 kafka]$ bin/kafka-topics.sh --zookeeper hadoop102:2181 --create --topic whale --partitions 3 --replication-factor 2Exception in thread "main" org.I0Itec.zkclient.exception.ZkTime
·
异常情况:
[henry@hadoop102 kafka]$ bin/kafka-topics.sh --zookeeper hadoop102:2181 --create --topic whale --partitions 3 --replication-factor 2
Exception in thread "main" org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server 'hadoop102:2181' with timeout of 30000 ms
at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1233)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:157)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:131)
at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:103)
at kafka.utils.ZkUtils$.apply(ZkUtils.scala:85)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:55)
at kafka.admin.TopicCommand.main(TopicCommand.scala)
jpsall命令查看集群中三个服务器情况后发现,zookeeper集群中3台仅启动1台,不满足选举机制中过半数的条件,因此zookeeper为正常启动
解决方法:
启动zookeeper2台服务器,激活leader选举过程,正常启动集群
更多推荐
已为社区贡献1条内容
所有评论(0)