今天测试dubbo的多播注册中心时遇到找不到服务提供者的问题,记录下问题及解决办法。
问题描述
按照Dubbo官方文档,Dubbo支持Multicast注册中心,我在本地启动消费者时提示
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'speakController': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.yiika.dubbo.dubbointerface.EchoService. No provider available for the service com.yiika.dubbo.dubbointerface.EchoService from the url multicast://224.5.6.7:1234/org.apache.dubbo.registry.RegistryService?application=dubbo-consumer&dubbo=2.0.2&interface=com.yiika.dubbo.dubbointerface.EchoService&lazy=false&methods=echo&pid=75400&qos.enable=false®ister.ip=10.37.129.2&release=2.7.3&side=consumer&sticky=false×tamp=1573636385238 to the consumer 10.37.129.2 use dubbo version 2.7.3
at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.postProcessPropertyValues(AnnotationInjectedBeanPostProcessor.java:151) ~[dubbo-2.7.3.jar:2.7.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1383) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.beans.factory.

本文详细描述了在Macbook上运行Dubbo时遇到的Multicast注册中心问题,经过排除项目配置、排查本机网络环境,发现是多播地址的分组和路由不一致导致的问题。解决方案是通过修改路由,将224.5.6.7路由到正确的网卡,最终成功解决。
最低0.47元/天 解锁文章
1734

被折叠的 条评论
为什么被折叠?



