Curator zookeeper异常:Error while calling watcher
错误
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相关推荐
- 【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_ ...
- Curator: ZooKeeper的使用配方
Curator: ZooKeeper的使用配方 ZooKeeper 作为分布式的存储方式, 有很多种使用场景, 把典型的使用场景提取出来, 成为"配方", 方便用户参考. Cura ...
- 【ZK-curator使用异常】KeeperErrorCode = Unimplemented for /***
[ZK-curator使用异常]KeeperErrorCode = Unimplemented for /*** 参考文章: (1)[ZK-curator使用异常]KeeperErrorCode = ...
- redhat 中安装rpm包时遇到异常 “error: Failed dependencies:xinetd is needed by .”
redhat 中安装rpm包时遇到异常 "error: Failed dependencies:xinetd is needed by ." 参考文章: (1)redhat 中安装 ...
- 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) ...
- 记一次Jenkins 打包异常 ERROR: Exception when publishing, exception message [Failure]
记一次Jenkins 打包异常 ERROR: Exception when publishing, exception message [Failure] 参考文章: (1)记一次Jenkins 打包 ...
- angularJS1 异常Error: [$injector:unpr]
代码如下:抛异常 Error: [$injector:unpr] <html><head><meta http-equiv="content-type" ...
- Linux环境:Zookeeper:Error contacting service. It is probably not running
Linux环境:Zookeeper:Error contacting service. It is probably not running 问题描述 Linux环境下Zookeeper使用命令bin ...
- Zookeeper出现Error contacting service. It is probably not running问题
Zookeeper出现Error contacting service. It is probably not running问题 使用多执行同时启动三台虚拟机的zookeeper能够成功启动,但查看 ...
最新文章
- matlab画复变函数,科学网—复数复变函数的Matlab计算与绘图 - 周铁戈的博文
- 从python中的列表中获取唯一值[重复]
- Ajax Control Toolkit 34个服务器端控件 详解
- Win32 汇编语句模板
- c#推箱子小游戏代码_推箱子小游戏V1.0制作
- [SDOI 2010]外星千足虫
- kibana-7.15.2 中文简体
- 拍人像的时候你喜欢哪种模特?
- GIS专业书籍、文档、数据、网站、工具等干货
- 【教程下载】QGIS的安装及中文配置教程.pdf
- Android P 9.0 MTK平台 增加以太网静态IP功能
- Java实现 LeetCode 400 第N个数字
- python -m json.tool的使用
- verilog报错汇总(2)
- 计算机软考高级职称论文,关于计算机软考,这里可以解决你所有的问题
- 互联网人「摆摊」姿势大全
- android studio 与eclipse创建命名空间时候的区别
- python计算速度和电脑有关系吗_Python中对数计算的基础会影响速度吗?
- Android逆向笔记(二) -- 破解AutoR的注册码验证
- C#登录窗体代码设计