错误

Curator启动后,间断出现异常。

2021-09-17 11:09:52.235 ERROR 14546 --- [ain-EventThread] org.apache.zookeeper.ClientCnxn          : Error while calling watcher java.lang.NoSuchMethodError: org.apache.curator.framework.WatcherRemoveCuratorFramework.postSafeNotify(Ljava/lang/Object;)Ljava/util/concurrent/CompletableFuture;at org.apache.curator.framework.recipes.locks.InterProcessSemaphoreV2$1.process(InterProcessSemaphoreV2.java:90)at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:77)at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:533)at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:508)

原因

Curator中初始化ZooKeeper时缺少Watcher参数。由Curator版本和zookeeper版本不一致导致,

解决方案

排除Curator中的zookeeper,引入与zookeeper匹配的版本,可以使用命令查看zk版本

echo stat|nc {ip} {port}
        <dependency><groupId>org.apache.zookeeper</groupId><artifactId>zookeeper</artifactId><version>3.4.5</version></dependency><dependency><groupId>org.apache.curator</groupId><artifactId>curator-recipes</artifactId><version>4.3.0</version></dependency>

其他情况

上面的方法不还是出错可能由于curotor以来的framework版本不一致。

调整curator-framework版本即可

             <dependency><groupId>org.apache.curator</groupId><artifactId>curator-framework</artifactId><version>3.4.0</version></dependency>

Curator zookeeper异常:Error while calling watcher相关推荐

  1. 【Dlib】在GPU环境中运行dlib中的例子dnn_mmod_ex报错...dlib::cuda_error...Error while calling cudaMalloc...

    1.问题描述 在GPU环境下运行dlib中的例子dnn_mmod_ex时,报错: terminate called after throwing an instance of 'dlib::cuda_ ...

  2. Curator: ZooKeeper的使用配方

    Curator: ZooKeeper的使用配方 ZooKeeper 作为分布式的存储方式, 有很多种使用场景, 把典型的使用场景提取出来, 成为"配方", 方便用户参考. Cura ...

  3. 【ZK-curator使用异常】KeeperErrorCode = Unimplemented for /***

    [ZK-curator使用异常]KeeperErrorCode = Unimplemented for /*** 参考文章: (1)[ZK-curator使用异常]KeeperErrorCode = ...

  4. redhat 中安装rpm包时遇到异常 “error: Failed dependencies:xinetd is needed by .”

    redhat 中安装rpm包时遇到异常 "error: Failed dependencies:xinetd is needed by ." 参考文章: (1)redhat 中安装 ...

  5. zookeeper 异常 :stat is not executed because it is not in the whitelist. Connection closed b

    zookeeper 异常 :stat is not executed because it is not in the whitelist. Connection closed b 参考文章: (1) ...

  6. 记一次Jenkins 打包异常 ERROR: Exception when publishing, exception message [Failure]

    记一次Jenkins 打包异常 ERROR: Exception when publishing, exception message [Failure] 参考文章: (1)记一次Jenkins 打包 ...

  7. angularJS1 异常Error: [$injector:unpr]

    代码如下:抛异常 Error: [$injector:unpr] <html><head><meta http-equiv="content-type" ...

  8. Linux环境:Zookeeper:Error contacting service. It is probably not running

    Linux环境:Zookeeper:Error contacting service. It is probably not running 问题描述 Linux环境下Zookeeper使用命令bin ...

  9. Zookeeper出现Error contacting service. It is probably not running问题

    Zookeeper出现Error contacting service. It is probably not running问题 使用多执行同时启动三台虚拟机的zookeeper能够成功启动,但查看 ...

最新文章

  1. matlab画复变函数,科学网—复数复变函数的Matlab计算与绘图 - 周铁戈的博文
  2. 从python中的列表中获取唯一值[重复]
  3. Ajax Control Toolkit 34个服务器端控件 详解
  4. Win32 汇编语句模板
  5. c#推箱子小游戏代码_推箱子小游戏V1.0制作
  6. [SDOI 2010]外星千足虫
  7. kibana-7.15.2 中文简体
  8. 拍人像的时候你喜欢哪种模特?
  9. GIS专业书籍、文档、数据、网站、工具等干货
  10. 【教程下载】QGIS的安装及中文配置教程.pdf
  11. Android P 9.0 MTK平台 增加以太网静态IP功能
  12. Java实现 LeetCode 400 第N个数字
  13. python -m json.tool的使用
  14. verilog报错汇总(2)
  15. 计算机软考高级职称论文,关于计算机软考,这里可以解决你所有的问题
  16. 互联网人「摆摊」姿势大全
  17. android studio 与eclipse创建命名空间时候的区别
  18. python计算速度和电脑有关系吗_Python中对数计算的基础会影响速度吗?
  19. Android逆向笔记(二) -- 破解AutoR的注册码验证
  20. C#登录窗体代码设计

热门文章

  1. Oracle安装的一些问题收集[转]
  2. java计算机毕业设计河东街摊位管理系统MyBatis+系统+LW文档+源码+调试部署
  3. Android笔记之UI篇
  4. 添加超声波障碍图层并用rbx1仿真
  5. Carbon 类常用函数
  6. 数论——余数相关定理
  7. java斜杠_java中对斜杠的处理
  8. 还不知道怎么制作用户体验地图?这份超全攻略送给你
  9. cv2.inRange()函数---提取票据中红色印章
  10. 被挟制路由器DNS该怎样实时发觉和防备方法