您的位置:首页 > 大数据 > 人工智能

Dubbo错误:No provider available for the service

2017-10-28 09:53 956 查看


Dubbo错误:No provider available for the service


错误信息:

Caused by:java.lang.IllegalStateException: Failed to check the status of the service com.itheima.UserService. No provider available for the service com.itheima.UserService from the url zookeeper://192.168.40.134:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbox-web&check=false&dubbo=2.8.4&generic=false&interface=com.itheima.UserService&methods=name&pid=5400&side=consumer×tamp=1509027241597
to the consumer 10.254.9.113
use dubbo version 2.8.4
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.AnnotationBean.refer(AnnotationBean.java:317)



解决方法:

dubbo监控中心:/tomcat/webapps/dubbo-admin/WEB-INF/dubbo.properties
一、修改dubbo.properties配置文件:
添加一行截图如下:
二、修改Dubbo服务端spring配置文件中dubbo发布信息:
<dubbo:protocol name="dubbo" port="20880" host="同上主机IP地址"/>
三、在Dubbo消费端spring配置文件dubbo消费信息中,添加如下一行:
<dubbo:protocol host="同上主机IP地址"/>

最后重启Dubbo监控中心、停止消费者端,停止服务提供端,启动服务提供端,再启动消费者端。去监控中心刷新看看,是不是一切都正常了!
[原文出处]:http://blog.csdn.net/chwshuang/article/details/51334180
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  dubbo zookeeper
相关文章推荐