zookeeper链接数导致kafka storm不能正常工作

Posted 木易森林

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了zookeeper链接数导致kafka storm不能正常工作相关的知识,希望对你有一定的参考价值。

报错信息:

  java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /brokers/topics/ejabberd-chat-offlines/partitions at storm.kafka.ZkCoordinator.refresh(ZkCoordinator.java:103) at storm.kafka.ZkCoordinator.getMyManagedPartitions(ZkCoordinator.java:69) at storm.kafka.KafkaSpout.nextTuple(KafkaSpout.java:108) at backtype.storm.daemon.executor$fn__4654$fn__4669$fn__4698.invoke(executor.clj:565) at backtype.storm.util$async_loop$fn__458.invoke(util.clj:463) at clojure.lang.AFn.run(AFn.java:24) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /brokers/topics/ejabberd-chat-offlines/partitions at storm.kafka.DynamicBrokersReader.getBrokerInfo(DynamicBrokersReader.java:81) at storm.kafka.ZkCoordinator.refresh(ZkCoordinator.java:79) ... 6 more Caused by: java.lang.RuntimeException: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /brokers/topics/ejabberd-chat-offlines/partitions at storm.kafka.DynamicBrokersReader.getNumPartitions(DynamicBrokersReader.java:94) at storm.kafka.DynamicBrokersReader.getBrokerInfo(DynamicBrokersReader.java:65) ... 7 more Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /brokers/topics/ejabberd-chat-offlines/partitions at org.apache.zookeeper.KeeperException.create(KeeperException.java:99) at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1590) at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:214) at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:203) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:107) at org.apache.curator.framework.imps.GetChildrenBuilderImpl.pathInForeground(GetChildrenBuilderImpl.java:199) at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:191) at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:38) at storm.kafka.DynamicBrokersReader.getNumPartitions(DynamicBrokersReader.java:91) ... 8 more

解决方案:

  修改zookeeper的配置文件,增加链接数配置

# the maximum number of client connections.
# increase this if you need to handle more clients
maxClientCnxns=500

 

  

以上是关于zookeeper链接数导致kafka storm不能正常工作的主要内容,如果未能解决你的问题,请参考以下文章

Kafka+Zookeeper+Storm的docker化

无法在kafka-storm中将偏移数据写入zookeeper

Storm Kafka Spout 上的最大元组重播数

Storm/Kafka - 无法获得 kafka 的偏移滞后

查看storm消费了多少kafka的数据

kafka和strom集群的环境安装