一次开启vmware使用dubbo时(zookeeper注册中心)遇到的问题

楼主在用dubbo时(zookeeper充当注册中心)在服务与消费者都正确配置时,服务提供方启动正常,而在消费者启动时

将会报错,具体错误信息如下

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service dubbo.HelloService. No provider available for the service dubbo.HelloService from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo-Consumer&check=false&dubbo=2.5.3&interface=dubbo.HelloService&methods=hello&pid=8508&side=consumer&timestamp=1537795407629 to the consumer 169.254.7.113 use dubbo version 2.5.3
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1600)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1076)
    at dubbo.Main.main(Main.java:13)
Caused by: java.lang.IllegalStateException: Failed to check the status of the service dubbo.HelloService. No provider available for the service dubbo.HelloService from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo-Consumer&check=false&dubbo=2.5.3&interface=dubbo.HelloService&methods=hello&pid=8508&side=consumer&timestamp=1537795407629 to the consumer 169.254.7.113 use dubbo version 2.5.3
    at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:420)
    at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300)
    at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:138)
    at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:65)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
    ... 6 more

Process finished with exit code 1

首先我进入zookeeper,dubbo节点下对应服务节点的providers节点,节点信息一切正常,这就很奇怪了,后看出错信息显示有 169.254.7.113这个地址,通过ipconfig发现,这是vmware提供的虚拟地址,消费者错连地址,从而导致消费者异常,找到了原因者就好解决了,打开网络和Internet设置,然后更改适配器设置,将带有vmware的所有适配器全都禁用,重新运行服务发现正常。

 


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值