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}的更多相关文章

  1. 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. ...

  2. 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 ...

  3. Thrown "KeeperErrorCode = Unimplemented for /services" exception

    1.环境 spring-boot 2.1.3 依赖项:spring-cloud-starter-zookeeper-discovery 版本2.1.1 使用的zookeeper3.4.11 代码如下: ...

  4. alimama open source mdrill启动后访问蓝鲸任务时出错:Caused by:org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss

    启动后,访问:http://IP:1107/mdrill.jsp  蓝鲸任务

  5. org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /eclipse20171118

    1:如果有一天,你有幸看到了这个错误,也许你像我一样low,因为此时,你已经准备开发Zookeeper程序了,却还没有把Zookeeper的服务启动起来. org.apache.zookeeper.K ...

  6. java连接zookeeper服务器出现“KeeperErrorCode = ConnectionLoss for ...”

    错误信息如下: Exception in thread "main" org.apache.zookeeper.KeeperException$ConnectionLossExce ...

  7. java连接zookeeper服务器出现“KeeperErrorCode = ConnectionLoss for /test”

    昨天调试java连接zookeeper服务器,zookeeper搭建过程在这里不做赘述,在创建连接后,然后操作节点一直报异常 错误信息如下: Exception in thread "mai ...

  8. rest-assured的根路径(root path)和URL编码(URL Encoding)

    一.根路径(Root path) 为了避免在body方法中使用重复的路径来断言,我们可以指定一个根路径(root path),比如: 我们以前的写法是: when(). get("/some ...

  9. 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 ...

随机推荐

  1. 洛谷P3703 树点涂色

    题意: 解: 发现我们每次染的都是不同的颜色,那么用lct维护的话一个颜色就会在一个splay里.染色是access. 维护每个节点到根路径上的虚边数量. 虚边的切换只会在access和link中出现 ...

  2. 第一篇-ubuntu18.04访问共享文件夹

    1. 在访问Windows共享资料之前,请确保Windows共享是可用的.Linux访问Windows共享或者LInux共享资料给Windows时,都使用Samba软件 rpm -qa | grep ...

  3. struts2 contextMap

    一.contextMap中的数据操作 root根:List 元素1 元素2 元素3 元素4 元素5 contextMap:Map key value application Map key value ...

  4. Ubuntu寻找某某库

    感觉这个方法很有用,记录一下 ubuntu14.04的error while loading shared libraries: libz.so.1问题 我们怎么这知道 libz.so.1在哪个包? ...

  5. 将Excel导出为SQL语句

    需求说明:公司做项目前进行需求分析,确定表结构后需要建表,如果照着表格去敲,那就太麻烦了,所以想到了自动生成SQL语句. 思路大概就是:解析Excel,拼接SQL语句,输出SQL文件. 第三方jar包 ...

  6. TODO java-awt中文乱码--疑惑

    参考:http://blog.sina.com.cn/s/blog_025270e90101b1db.html 1.IDE工具是eclipse,检查了编码是UTF-8,控制台中是中文,用awt就会乱码 ...

  7. LoRa网关/RAK831

    Semtech SX1301 同时在不同的信道上接收数据 RAK831 能够在不同信道上同时接收多达 8 个同时发送不同扩频因子的 LoRa 数据 包

  8. python模块之os模块

    os模块 用途:调用封装好的方法调用操作系统的功能,处理文件和目录,OS模块不受平台限制. os.name字符串指示你正在使用的平台.比如对于Windows,它是'nt',而对于Linux/Unix用 ...

  9. C# 数据库批量插入数据之 —— SqlBulkCopy、表值参数

    创建了一个用来测试的Student表: CREATE TABLE [dbo].[Student]( [ID] [int] PRIMARY KEY NOT NULL, ) NULL, ) NULL, [ ...

  10. BZOJ2006 ST表 + 堆

    https://www.lydsy.com/JudgeOnline/problem.php?id=2006 题意:在长度N的序列中求K段长度在L到R之间的区间,使得他们的和最大 很容易想到要求一个前缀 ...