一次开启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的所有适配器全都禁用,重新运行服务发现正常。

 


 

展开阅读全文

没有更多推荐了,返回首页