Thrown "KeeperErrorCode = Unimplemented for /services" exception
1.环境
spring-boot 2.1.3 依赖项:spring-cloud-starter-zookeeper-discovery 版本2.1.1
使用的zookeeper3.4.11
代码如下:
package com.example.demo; import java.net.InetAddress;
import java.net.UnknownHostException; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; @Configuration
@EnableAutoConfiguration
@EnableDiscoveryClient
@RestController
public class ZkDiscoveryApplication { @RequestMapping("/")
@ResponseBody
String home() {
String message = "Hello World from Greeting Microservice located at %s!";
try {
String address = InetAddress.getLocalHost().getHostAddress();
message = String.format(message, address);
} catch (UnknownHostException e) {
message = String.format(message, "Unknown Host");
} return message; }
2.启动spring boot项目报错
Thrown "KeeperErrorCode = Unimplemented for /services" exception
3.原因
Curator 和zookeeper的版本不一致
4.解决方式
zookeeper升级到最新的5.x后异常消失
Thrown "KeeperErrorCode = Unimplemented for /services" exception的更多相关文章
- 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. ...
- zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for {root.path}
1 异常结果 org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented ...
- zookeeper服务发现实战及原理--spring-cloud-zookeeper源码分析
1.为什么要服务发现? 服务实例的网络位置都是动态分配的.由于扩展.失败和升级,服务实例会经常动态改变,因此,客户端代码需要使用更加复杂的服务发现机制. 2.常见的服务发现开源组件 etcd—用于共享 ...
- How a C++ compiler implements exception handling
Introduction One of the revolutionary features of C++ over traditional languages is its support for ...
- Circuit Breaker Pattern(断路器模式)
Handle faults that may take a variable amount of time to rectify when connecting to a remote service ...
- ABP框架系列之五:(Unit Of Work-工作单元)
Introduction Connection and transaction management is one of the most important concepts in an appli ...
- zookeeper各种报错、原因及解决方法汇总(持续更新)
[root@iZ23nn1p4mjZ zookeeper-3.4.10]# bin/zkCli.sh -server localhost:2181,localhost:2182,localhost:2 ...
- CMAK(Kafka Manager)安装
CMAK 是管理Kafka集群的常用工具,之前的名字叫Kafka Manager.CMAK功能很强大,它可以管理多个Kafka集群,查看集群内部状态,如:topic.broker.consumer.p ...
- 【夯实PHP基础】PHP标准库 SPL
PHP SPL笔记 这几天,我在学习PHP语言中的SPL. 这个东西应该属于PHP中的高级内容,看上去很复杂,但是非常有用,所以我做了长篇笔记.不然记不住,以后要用的时候,还是要从头学起. 由于这是供 ...
随机推荐
- 学习Acegi应用到实际项目中(7)- 缓存用户信息
在默认情况下,即在用户未提供自身配置文件ehcache.xml或ehcache-failsafe.xml时,EhCache会依据其自身Jar存档包含的ehcache-failsafe.xml文件所定制 ...
- 手写简单PE
环境工具:Windows 10 010Editor 目标程序功能: 调用MessageBoxA弹出消息框. 1.构造DOS头 typedef struct _IMAGE_DOS_HEADER { // ...
- swagger 参数
http://www.mamicode.com/info-detail-2213514.html
- pageHelper的使用步骤,省略sql语句中的limit
1.引架包.注意版本问题 <dependency> <groupId>com.github.pagehelper</groupId> <artifactId& ...
- python_flask 基础巩固(自定义URL转换器)
自定义URL转换器(在BaseConverter类外定义)from werkzeug.routing import BaseConverter定义类继承BaseConverter 实现类app.url ...
- POJ2947-Widget Factory
工厂里每件期间的生产时间为3-9天,告诉你有N个器件和M个计划,每个计划都是说明生产1-N号器件的时间,最后问你每件器件的生产时间.或者多解或没有解. 例如样例 2 3 2 MON THU 1 2 3 ...
- 12-Python操作json
1.概述 Python操作json文件在测试中会经常用到,那么python怎么操作json文件呢,今天就来简单了解一下.Python中提供了dumps.dump.loads.load,用于字符串 和 ...
- 录音--获取语音流(pyAudio)
这是学习时的笔记,包含相关资料链接,有的当时没有细看,记录下来在需要的时候回顾. 有些较混乱的部分,后续会再更新. 欢迎感兴趣的小伙伴一起讨论,跪求大神指点~ 录音-语音流(pyAudio) tags ...
- 解决weblogic 部署环境后出现的乱码问题
1.在startWebloci.cmd 中 set CLASSPATH=%SAVE_CLASSPATH% 下增加一行 JAVA_OPTIONS="${JAVA_OPTIONS} -Dfile ...
- Android Studio 常见问题及解决方法
一.Error:All flavors must now belong to a named flavor dimension 问题描述: Error:All flavors must now bel ...