dubbo消费端报错

uknow8692 发布于 2016/09/11 00:18
阅读 1K+
收藏 0

我把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
请问是什么原因?

加载中
0
Guest_Main
Guest_Main
之前遇到过 双网卡时找不到提供者
0
代码天下
代码天下
消费端dubbo配置错误,应该是接口bean配置的地方
0
uknow8692
uknow8692

引用来自“Guest_Main”的评论

之前遇到过 双网卡时找不到提供者
你是怎么解决的啊?
0
uknow8692
uknow8692

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

消费端dubbo配置错误,应该是接口bean配置的地方
那这个要怎么解决呢?我的服务提供方是一个工程,服务消费方是另一个工程,没有将服务提供方打包放入到消费方工程里面去,这样应该可以吧,他们的包名是一样的
代码天下
代码天下
只需要讲提供方的接口和javabean打包放到消费方即可。具体还得看下你的消费方dubbo的具体配置。可贴下你的配置代码看看
0
Guest_Main
Guest_Main
提供者指定网卡 配置个host http://m.myexception.cn/open-source/2050431.html
0
alexgaoyh
alexgaoyh
双网卡的原因??
返回顶部
顶部