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中的高级内容,看上去很复杂,但是非常有用,所以我做了长篇笔记.不然记不住,以后要用的时候,还是要从头学起. 由于这是供 ...
随机推荐
- centos7搭建Cisco上网方式
1.下载脚本 wget https://git.io/vpnsetup-centos -O vpnsetup.sh 2.修改 vi vpnsetup.sh 替换为你自己的值: YOUR_IPSEC_P ...
- Android Studio 3.1.2 修改字体(font)大小(size) 及老版本修改主题、字体、颜色 参照地址
Android Studio 3.1.2 修改字体(font)大小(size) 步骤:File-Settings-Editor-Color Scheme-Color Scheme Font-Size ...
- recyclerview刷新
https://blog.csdn.net/leejizhou/article/details/51179233 RecyclerView之更新UI数据的高级用法 https://www.cnblog ...
- Ubuntu14.04下中文输入法拼音不正常问题 输入nihao会变成niha o
1. 打开输入法首选项,选择拼音模式,选择全拼 2. 在终端中输入ibus-daemon –drx
- 【MySql】启动/停止
一.启动 1.查看启动命令所在目录 macdeMacBook-Pro:~ mac$ ps -ef|grep mysql 2.进入命令目录 macdeMacBook-Pro:~ mac$ cd /usr ...
- 关于http与https的注意点
背景:在一次项目生产上线中遇到地址在IOS版本的app中打不开或者接口请求不返回的情况,在安卓机和PC上表现正常,经排查,问题出在http请求上,原因详解 在早期PC上和安卓手机上比较不严格,在htt ...
- BiggerInteger类
java.math.BigInteger(需要导包)1.BigInteger构造方法*public BigInteger(String val)将 BigInteger 的十进制字符串表示形式转换为 ...
- Android-shape圆形&转圈圈
圆形: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="h ...
- 谷歌浏览器隐藏url前缀问题
此前曾有用户表示,谷歌若在Chrome的地址栏中隐藏URL的HTTP.HTTPS及WWW前缀,那么用户的安全将有可能遭至威胁,如果你不希望Chrome浏览器隐藏URL的HTTP.HTTPS及WWW前 ...
- C++ Opencv createTrackbar()创建滑动条实现对比度、亮度调节及注意事项
一.对比度.亮度概念普及 1.1对比度 对比度指的是一幅图像中明暗区域最亮的白和最暗的黑之间不同亮度层级的测量,差异范围越大代表对比越大,差异范围越小代表对比越小.对比度对视觉效果的影响非常关键,一般 ...