请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

zookeeper启动成功,但是dubbo还是链接不上

mac下 zookeeper启动成功:
图片描述
到那时启动provider还是启动失败,说zookeeper is not connect yet:
2019-02-10 17:40:35.097 INFO 5534 — [-localhost:2181] org.I0Itec.zkclient.ZkEventThread : Starting ZkClient event thread.
2019-02-10 17:41:05.106 WARN 5534 — [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘com.alibaba.dubbo.spring.boot.DubboProviderAutoConfiguration’: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to register dubbo://192.168.0.102:20880/com.dubbo.ServiceAPI?anyhost=true&application=provider&dubbo=2.6.0&generic=false&interface=com.dubbo.ServiceAPI&methods=sendMessage&pid=5534&side=provider&timestamp=1549791629973 to registry localhost:2181, cause: Failed to register dubbo://192.168.0.102:20880/com.dubbo.ServiceAPI?anyhost=true&application=provider&dubbo=2.6.0&generic=false&interface=com.dubbo.ServiceAPI&methods=sendMessage&pid=5534&side=provider&timestamp=1549791629973 to zookeeper zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?application=provider&dubbo=2.6.0&interface=com.alibaba.dubbo.registry.RegistryService&pid=5534&timestamp=1549791624963, cause: Zookeeper is not connected yet!
2019-02-10 17:41:05.116 INFO 5534 — [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2019-02-10 17:41:05.125 ERROR 5534 — [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘com.alibaba.dubbo.spring.boot.DubboProviderAutoConfiguration’: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to register dubbo://192.168.0.102:20880/com.dubbo.ServiceAPI?anyhost=true&application=provider&dubbo=2.6.0&generic=false&interface=com.dubbo.ServiceAPI&methods=sendMessage&pid=5534&side=provider&timestamp=1549791629973 to registry localhost:2181, cause: Failed to register dubbo://192.168.0.102:20880/com.dubbo.ServiceAPI?anyhost=true&application=provider&dubbo=2.6.0&generic=false&interface=com.dubbo.ServiceAPI&methods=sendMessage&pid=5534&side=provider&timestamp=1549791629973 to zookeeper zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?application=provider&dubbo=2.6.0&interface=com.alibaba.dubbo.registry.RegistryService&pid=5534&timestamp=1549791624963, cause: Zookeeper is not connected yet!
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:139) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:419) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1737) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

正在回答 回答被采纳积分+3

1回答

提问者 BruceWU 2019-02-11 00:09:03

我上网找了2天了 试过所有方法  包括降低dubbo版本 设置长一些dubbo 的timeout 都是不行

最后我采用了redis为注册中心 可以了  晕

0 回复 有任何疑惑可以回复我~
  • Allen #1
    zookeeper作为注册中心的访问、防火墙之类的内容都检查了么
    回复 有任何疑惑可以回复我~ 2019-02-25 19:22:49
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信