KeeperErrorCode = Unimplemented for /test
在使用Curator连接Zookeeper时报错,原因是因为版本问题。
本地环境:
zookeeper版本:zookeeper-3.4.x
cuartor版本:4.0.0
看Curator官网的声明:
地址:
http://curator.apache.org/zk-compatibility.html
Curator 2.x.x - compatible with both ZooKeeper 3.4.x and ZooKeeper 3.5.x
Curator 3.x.x - compatible only with ZooKeeper 3.5.x and includes support for new features such as dynamic reconfiguration, etc.
版本不匹配的问题,我使用的curator版本过高,使用2.xx就没有问题了。
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>2.10.0</version>
</dependency>
还没有评论,来说两句吧...