开发者社区> 问答> 正文

dubbo消费端报错?报错

我把dubbo的服务提供方启动成功了,而且在dubbo管控台里面都看到服务提供方了,但是在执行服务消费方时报错了,报错如下:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.dubbo.provider.DemoService. No provider available for the service com.dubbo.provider.DemoService from the url zookeeper://119.29.169.51:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=consumer-of-webapp&check=false&default.timeout=5000&dubbo=2.5.4-SNAPSHOT&generic=false&interface=com.dubbo.provider.DemoService&methods=build&pid=5760&side=consumer&timestamp=1473523258002 to the consumer 192.168.1.100 use dubbo version 2.5.4-SNAPSHOT
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:173)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1467)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1119)
at com.dubbo.provider.Main.main(Main.java:13)
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.dubbo.provider.DemoService. No provider available for the service com.dubbo.provider.DemoService from the url zookeeper://119.29.169.51:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=consumer-of-webapp&check=false&default.timeout=5000&dubbo=2.5.4-SNAPSHOT&generic=false&interface=com.dubbo.provider.DemoService&methods=build&pid=5760&side=consumer&timestamp=1473523258002 to the consumer 192.168.1.100 use dubbo version 2.5.4-SNAPSHOT
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:166)
... 6 more
请问是什么原因?

展开
收起
爱吃鱼的程序员 2020-06-09 10:39:21 729 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    之前遇到过双网卡时找不到提供者消费端dubbo配置错误,应该是接口bean配置的地方<divclass='ref'>

    引用来自“Guest_Main”的评论

    之前遇到过双网卡时找不到提供者<divclass='ref'>

    引用来自“代码天下”的评论

    消费端dubbo配置错误,应该是接口bean配置的地方只需要讲提供方的接口和javabean打包放到消费方即可。具体还得看下你的消费方dubbo的具体配置。可贴下你的配置代码看看提供者指定网卡配置个hosthttp://m.myexception.cn/open-source/2050431.html双网卡的原因??

    2020-06-09 10:39:36
    赞同 展开评论 打赏
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Dubbo开源现状与2.7规划 立即下载
Dubbo分布式服务治理实战 立即下载
《Dubbo 3.0 前瞻》 立即下载