内容简介:我的zookeeper是安装在本地,用的默认端口2181,版本3.4.10。dubbo版本2.5.8。dubbo-demo-provider.xml配置文件修改为:<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
我的zookeeper是安装在本地,用的默认端口2181,版本3.4.10。dubbo版本2.5.8。
dubbo-demo-provider.xml配置文件修改为:
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
运行Provider就会报下面的错:
[24/12/17 04:56:57:057 CST] main ERROR zkclient.ZkClientWrapper: [DUBBO] Timeout! zookeeper server can not be connected in : 30000ms!, dubbo version: 2.0.0, current host: 127.0.0.1
最后导致
Caused by: java.lang.IllegalStateException: Zookeeper is not connected yet!
at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkClientWrapper.createPersistent(ZkClientWrapper.java:82)
at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient.createPersistent(ZkclientZookeeperClient.java:45)
at com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient.create(AbstractZookeeperClient.java:47)
at com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient.create(AbstractZookeeperClient.java:41)
at com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient.create(AbstractZookeeperClient.java:41)
at com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient.create(AbstractZookeeperClient.java:41)
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.doRegister(ZookeeperRegistry.java:110)
... 21 more
求解答,非常感谢!
解决办法:
1,检查jdk版本,jdk1.6 dubbo 2.5版本,2.6版本则使用jdk1.8,dubbo的版本过高或者过低的原因!
2,配置zookeeper中的配置文件,配置超时时间,配大一点!
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Flow-Based Programming (2nd Edition)
CreateSpace / 2010-5-14 / $69.95
Written by a pioneer in the field, this is a thorough guide to the cost- and time-saving advantages of Flow-Based Programming. It explains the theoretical underpinnings and application of this program......一起来看看 《Flow-Based Programming (2nd Edition)》 这本书的介绍吧!