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中的高级内容,看上去很复杂,但是非常有用,所以我做了长篇笔记.不然记不住,以后要用的时候,还是要从头学起. 由于这是供 ...
随机推荐
- php7 三元运算 精简
$abc = isset($_GET['name'])?$_GET['name']:'abc'; // 5.+ $abcd = $_GET[
- DataStructs.h
#ifndef _DATASTRUCS_H__ #define _DATASTRUCS_H__ #include <systemc.h> #include "GlobalPara ...
- s6-4 TCP 数据段
传输控制协议 TCP (Transmission Control Protocol) 是专门为了在不可靠的互联网络上提供可靠的端到端字节流而设计的 TCP必须动态地适应不同的拓扑.带宽.延迟. ...
- Runtime "Apache Tomcat v6.0 (3)" is invalid. The JRE could not be found. Edit the server and change the JRE location解决方案
使用eclipse,启动Tomcat时出现The JRE could not be found ,Edit server and change teh JRE location的错误提示! 原因:重装 ...
- 如何更改github工程的语言属性
当创建github项目的时候,github本身会根据提交文件的数量来自动推断工程的开发语言,有时这种推断结果会与实际情况不太相符.比如上传一个java的web工程,如果在工程里存在大量的html.ja ...
- PyCharm连接远程服务器
PyCharm连接远程服务器 1.Tools->Start SSH session 2.新建一个连接或者选择一个已经存在的sftp 3.选择Edit credentials 填写相关连接信息 4 ...
- C++ 虚函数的两个例子
1. 第一个例子是朋友告诉我Qt中的某个实现 1 #include <iostream> 2 3 // Qt中的某个实现 4 class A{ 5 public: 6 A() = defa ...
- java.lang.OutOfMemoryError: PermGen space (jvm内存泄漏解决办法)
2.在myeclipse根目录 打开myeclipse.ini 3.在myeclipse中配置内存
- 图片处理类 类库--C#
调用如下: Bitmap bitmap = new Bitmap("C:\\Users\\Thinkpad\\Desktop\\aa.jpg"); Bitmap[] bit = n ...
- Python psutil模块使用
import psutil # 获取内存信息 mem = psutil.virtual_memory() total = mem.total / 1024 / 1024 / 1024 used = m ...