一、背景

使用zookeeper操作时提示这个错误信息

ERROR org.apache.zookeeper.ClientCnxn: - Error while calling watcher

java.lang.NullPointerException
  at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:530)
  at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:505)

但是检查zookeeper服务器上实际的操作却是成功了。

二、抛出位置

zk = new ZooKeeper(url, , null);

三、解决方法

zk = new ZooKeeper(url, , new Watcher(){
@Override
public void process(WatchedEvent event) {
// TODO Auto-generated method stub
logger.debug(" receive event : "+event.getType().name());
}
});

ERROR org.apache.zookeeper.ClientCnxn:532 - Error while calling watcher的更多相关文章

  1. WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)

    [2017-05-19 13:32:14,933] INFO Waiting for keeper state SyncConnected (org.I0Itec.zkclient.ZkClient) ...

  2. WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn) java.net.ConnectException: Connection refused

    1.启动kafka的脚本程序报如下所示的错误: [hadoop@slaver1 script_hadoop]$ kafka-start.sh start kafkaServer... [-- ::,] ...

  3. Linux下启动tomcat报错,WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.net.ConnectException:

    tomcat启动完了之后,一直不停的打印这种错误信息,看表面上,应该是zk节点下的数据是空的,连接不上服务,所以一直在尝试连接,然后一直又连不上: 完整的错误信息: 407662 [usf-ZooKe ...

  4. org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x160fd6f04410017 after 0ms

    dubbo报错: org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x160fd6f04410017 after ...

  5. ERROR:"org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode = NoAuth for /config/topics/test" when creating or deleting Kafka operations authorized through the Ranger policies

    PROBLEM DESCRIPTION When creating or deleting topics in Kafka, they cannot be authorized through the ...

  6. 全网最详细的启动zkfc进程时,出现INFO zookeeper.ClientCnxn: Opening socket connection to server***/192.168.80.151:2181. Will not attempt to authenticate using SASL (unknown error)解决办法(图文详解)

    不多说,直接上干货! at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:) at org ...

  7. Dubbo消费端错误: ClassNotFoundException: org.apache.zookeeper.proto.WatcherEvent

    出现错误的原因是消费端war没有启动成功, 但是zkClient和Dubbo的对应Thread启动了, web container无法加载对应的类, INFO: Initializing Protoc ...

  8. Download and Install Apache Zookeeper on Ubuntu

    http://www.techburps.com/misc/download-and-install-apache-zookeepr/36 In previous article of this Bi ...

  9. java.lang.NoClassDefFoundError: org/apache/zookeeper/proto/SetWatches

    Session 0x16b21fa441900b6 for server 192.168.240.126/192.168.240.126:2181, unexpected error, closing ...

随机推荐

  1. Python学习(六)模块 —— 标准模块

    Python 标准模块 Python 带有一个标准模块库,并发布有独立的文档(库参考手册).对于程序员而言,标准库与语言本身同样重要,它好比一个百宝箱,能为各种常见的任务提供完美的解决方案. 这边简单 ...

  2. iOS: 如何调节UITabbarItem的图片和文字位置

    转载自:http://blog.csdn.net/kevinwlc/article/details/21467499/ 在ios7中,方法setFinishedSelectedImage:withFi ...

  3. 如何在SharePoint的列表中使用通配符来filter出ListItem?

    一个朋友问我这样一个问题, 他想要快速从SharePoint的文档库中filter出来名字中先带有一个Q, 接着一些其他的字符, 后面再跟着有一个数字20这样的文件.   第一个想法就是修改Share ...

  4. swfupload js中 file 对象的属性

    name=3cc68cfc60b87e6dd6887d8a.jpg modificationdate=Wed   Apr 21 15:48:30 UTC+0800 2010 filestatus=-1 ...

  5. Python 爬虫 之 阅读呼叫转移(三)

    尽管上一篇博客中我们能够连续地阅读章节了,可是.难道每一次看小说都执行一下我们的 Python 程序?连记录看到哪里都不行,每次都是又一次来过?当然不能这样,改! 如今这么多小说阅读器,我们仅仅须要把 ...

  6. List、Set、Map、数组之间各种转换

    刚学Java不久的时候,接到一个电面,然后问了一些java的知识,比如说Java的编码,Unicode等,但是最让我蛋疼的是怎么吗map转为set,那个时候对集合用的很少,对集合不是特别了解,map还 ...

  7. 使用SQL SERVER FOR XML PATH将多个结果集转换成一行并进行去重处理

    在一个医药行业的系统中需要根据患者的接触记录ID获取不同接触类型的集合,效果像这样     --患者接触记录信息,一个患者可以有N个不同的接触记录,每个接触记录又有N个接触类型记录 IF OBJECT ...

  8. (剑指Offer)面试题11:数值的整数次方

    题目: 给定一个double类型的浮点数base和int类型的整数exponent.求base的exponent次方. 思路: 看题目似乎很简单,循环相乘不就行了吗?不是的. 需要考虑几个问题: 1. ...

  9. T-SQL 之 存储过程

    当存储过程执行一次后,可以将语句缓存中,这样下次执行的时候直接使用缓存中的语句.这样就可以提高存储过程的性能. 一.存储过程的概念 存储过程Procedure是一组为了完成特定功能的SQL语句集合,经 ...

  10. KineticJS教程(3)

    KineticJS教程(3) 作者: ysm  3.图形对象 3.1.Shape Kinetic提供了一个Shape对象用于在层上绘制图形,我们可以通过Kinetic.Shape()构造方法返回一个S ...