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中的高级内容,看上去很复杂,但是非常有用,所以我做了长篇笔记.不然记不住,以后要用的时候,还是要从头学起. 由于这是供 ...
随机推荐
- 01 C语言程序设计--01 C语言基础--第3章 基本数据类型01
01.1.3.1序言 00:02:17 01.1.3.2 C语言中的基本元素和常量的概念 00:08:54 01.1.3.3示例--常量 00:12:08 01.1.3.4变量的概念和命名规则 00: ...
- abaqus修改inp直接建立工程
前面已经知道,通过修改以下inp的节点和单元编号,就可以新建模型,可是对于大的工程来说,逐个选取单元进行添加材料以及确定哪步进行填土仍是比较麻烦的(如果工程网格划分好并告知哪些单元好属于哪些材料,哪些 ...
- C#语法快速热身
if选择结构: 简单:if结构 单分子:If-else结构 多重:f-else-if结构 嵌套:if结构 语法: If(条件1){ If(条件2) }else{ } }else{ } Switch结构 ...
- log4j的添加顺序
1.log4j的架包 <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api&l ...
- Robust Influence Maximization
一. 研究背景 在社会和经济网络中,影响最大化问题在过去十年中得到广泛的研究,由于其广泛应用于病毒式营销[1,2],突破检测[3],谣言监测[4]等.例如公司可以通过向初始用户(称为种子)发送免费 ...
- idea 中dao层自动生成接口
1.在生成接口的类上右键 2.选中要生成的接口方法 3.点击Yes 4.出现(? reference in ? file)即生成成功
- 安装memcache遇到的坑
memcached 在make的时候出错,解决办法: # vim memcached.c 修改如下几行56 /* FreeBSD 4.x doesn't have IOV_MAX exposed. * ...
- Visualizing the Git data model
I wrote a small tool git-graph.py over the weekend which can be used to generate the object graph of ...
- 谈谈 TCP 的 TIME_WAIT
由来 最近有同事在用 ab 进行服务压测,到 QPS 瓶颈后怀疑是起压机的问题,来跟我借测试机,于是我就趁机分析了一波起压机可能成为压测瓶颈的可能,除了网络 I/O.机器性能外,还考虑到了网络协议的问 ...
- 知乎十万级容器规模的Java分布式镜像仓库实践
作者:知乎令孤无忌 前言 知乎在 2016 年已经完成了全量业务的容器化,并在自研容器平台上以原生镜像的方式部署和运行,并在后续陆续实施了 CI.Cron.Kafka.HAProxy.HBase.Tw ...