dubbo
dubbo copied to clipboard
zookeeper集群中有一个节点宕掉,注册中心连接失败
Environment
- Dubbo version: 2.8.4
- Operating System version: CentOS6.5
- Java version: 1.7.0_17
- Zookeeper version: 3.4.6
Steps to reproduce this issue
- 配置注册中心zookeeper集群方式
<dubbo:registry protocol="zookeeper" address="10.10.10.1:2181,zk02.domain.com:2181,10.10.10.3:2181" id="app_dubbo" group="dubbo" default="false"/>
- 将上述其中一个节点宕掉,即客户端连接不上zk;我这边是zk02.domain.com 已经连不上,但10.1和10.3是OK的。
- 这个时候重启应用就会报错;并且启动失败。
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
重启应用后,我希望注册中心在宕了一个zk节点的情况下,是可以使用另外两个OK的zk节点继续工作以保证我的应用正常启动。zookeeper集群如果只宕了一个我理解另外两个还是可用的。那为何不用另外两个OK的去注册呢。而是直接报错,并且启动。那如果是这样,zookeeper的集群模式又有何作用? 又或者是我们的使用方法有问题?
actual result
Exception: Error creating bean with name 'cityController': Unsatisfied dependency expressed through field 'areaSyncService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'areaSyncServiceImpl': Unsatisfied dependency expressed through field 'bossRemoteService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bizRemoteService': FactoryBean threw exception on object creation; nested exception is org.I0Itec.zkclient.exception.ZkException: Unable to connect to 10.10.10.1:2181,zk02.domain.com:2181,10.10.10.3:2181
2.5.7已经修复了这个问题,你看看release记录。 另外你用的2.8.4是什么版本呢?可以贴下maven坐标吗?
感谢回复;我确实是在issue里看到过说这个问题在以前的版本里修复了。

@356082462 您好,我想问下,我们的这个版本是啥版本呢。 我看release最高才到2.6.......
Maybe it is dubbox.
是的,非常抱歉。走错地方了。。。