zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for {root.path}
1 异常结果
org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for /curator at org.apache.zookeeper.KeeperException.create(KeeperException.java:103)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:1525)
at org.apache.curator.framework.imps.CreateBuilderImpl$17.call(CreateBuilderImpl.java:1189)
at org.apache.curator.framework.imps.CreateBuilderImpl$17.call(CreateBuilderImpl.java:1166)
at org.apache.curator.connection.StandardConnectionHandlingPolicy.callWithRetry(StandardConnectionHandlingPolicy.java:64)
at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:100)
at org.apache.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:1163)
at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:603)
at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:593)
at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:47)
at cn.practice.zk.ZookeeperClientPractice.test(ZookeeperClientPractice.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
2 原因是Zookeeper的版本与curator的版本不匹配造成的
自己查阅了一下资料发现匹配规则如下
curator作为zookeeper的客户端,并不是最新版的就没问题,因为它的版本和zookeeper的版本有对应关系。 ZooKeeper 3.5.x
Curator4.0十分依赖Zookeeper3.5.X ZooKeeper 3.4.x
Curator4.0在软兼容模式下支持Zookeeper3.4.X,但是需要依赖排除zookeeper 复制代码
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>${curator-version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
</exclusions>
</dependency>
复制代码
同时必须加入Zookeeper3.4.X的依赖,并且呢,因为是软兼容模式,一些3.4.X不具备的新特性是不能使用的。 低版本
对于Curator2.X是支持Zookeeper3.4.X的,所以如果目前你是Zookeeper3.4.X的版本,还是使用Curator2.X的吧,
3 解决方案,因为我的部署Zookeeper版本为3.4.5所以应该选择2.x的curator版本
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-client</artifactId>
<version>2.12.0</version> </dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>2.12.0</version>
</dependency>
重新maven导入一下jar包解决问题,之前已经创建成功过了,所以抛出节点已经存在的错误

zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for {root.path}的更多相关文章
- java.lang.reflect.UndeclaredThrowableException: null Caused by: org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for
java.lang.reflect.UndeclaredThrowableException: null at org.springframework.util.ReflectionUtils. ...
- 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 ...
- Thrown "KeeperErrorCode = Unimplemented for /services" exception
1.环境 spring-boot 2.1.3 依赖项:spring-cloud-starter-zookeeper-discovery 版本2.1.1 使用的zookeeper3.4.11 代码如下: ...
- alimama open source mdrill启动后访问蓝鲸任务时出错:Caused by:org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss
启动后,访问:http://IP:1107/mdrill.jsp 蓝鲸任务
- org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /eclipse20171118
1:如果有一天,你有幸看到了这个错误,也许你像我一样low,因为此时,你已经准备开发Zookeeper程序了,却还没有把Zookeeper的服务启动起来. org.apache.zookeeper.K ...
- java连接zookeeper服务器出现“KeeperErrorCode = ConnectionLoss for ...”
错误信息如下: Exception in thread "main" org.apache.zookeeper.KeeperException$ConnectionLossExce ...
- java连接zookeeper服务器出现“KeeperErrorCode = ConnectionLoss for /test”
昨天调试java连接zookeeper服务器,zookeeper搭建过程在这里不做赘述,在创建连接后,然后操作节点一直报异常 错误信息如下: Exception in thread "mai ...
- rest-assured的根路径(root path)和URL编码(URL Encoding)
一.根路径(Root path) 为了避免在body方法中使用重复的路径来断言,我们可以指定一个根路径(root path),比如: 我们以前的写法是: when(). get("/some ...
- difference in physical path, root path, virutal path, relative virtual path, application path and aboslute path?
http://stackoverflow.com/questions/13869817/difference-in-physical-path-root-path-virutal-path-relat ...
随机推荐
- 【POJ2411】Mondriaan's Dream
题目大意:给定一个 N*M 的棋盘,用 1*2 的木条填满有多少种不同的方式. 题解:在这里采用以行为阶段进行状压 dp.到第 i 行时,1*1 的木块分成两类,第一类是这个木块是竖着放置木条的上半部 ...
- 【洛谷P1059 明明的随机数】
题目描述明明想在学校中请一些同学一起做一项问卷调查,为了实验的客观性,他先用计算机生成了N个1到1000之间的随机整数(N≤100),对于其中重复的数字,只保留一个,把其余相同的数去掉,不同的数对应着 ...
- ImageMagick 笔记: 索引颜色(index color)、锁定图层,透明 png 转 gif (保持清晰度)
今天在处理一张 png 透明背景的图片,大小: 16KB, 尺寸: 400 x 300,用到一段代码,也许对以后有用. /** 带透明背景和阴影的png图片, 转换成 gif, [索引色] + [锁住 ...
- MySQL排序函数field()详解
在日常开发过程中,排序是经常用到的,有时候有这样的需求. 比如,需要在查询结果中根据某个字段的具体值来排序.如下面例子 上面是一张个人信息 表,假如我们想按照'seiki','iris','xut'来 ...
- 激活miniconda2环境,出现activate命令不存在的解决方案(activate: No such file or directory)
miniconda2版本比较低时会出现这种报错,通过更新miniconda2就可以解决这个问题,用到的命令行: /path/to/miniconda2/conda update conda 参考链接: ...
- mybatis的一种批量更新方法【我】
接手一个项目,项目主要架构用的 servlet 3.0 + spring + mybatis 其中发现一个问题: 操作数据时,批量插入可以,批量更新,使用各种写法都无法成功,直接报 mybatis转换 ...
- spring cron表达式(定时器)
转: spring cron表达式(定时器) 写定时器时用到,记录一下: Cron表达式是一个字符串,字符串以5或6个空格隔开,分开工6或7个域,每一个域代表一个含义,Cron有如下两种语法 格式: ...
- 测试唯一ID支持多大的并发量
昨天突然考虑到这个问题,在并发比较大的情况下,你用于生成唯一ID的函数是否还能正常运行?也就是说比如我一下子进来40000个订单,你需要生成不重复的订单ID吧? 对于这个问题我以前没考虑过,但是可能是 ...
- pageObject学习
1.java代码层面的pageObject实现 参考:https://www.cnblogs.com/yytesting/p/6973474.html 是用java写的实例,优点是结构很清晰,缺点是p ...
- c#的一些快捷键
ctrl+c+s 外加代码 F12 转到定义 ctrl+F5调试 一些补全命令 svm Main函数的补全命令 prop 属性的补全命令