Dubbo错误:No provider available for the service

来源:互联网 发布:英国海淘鞋子 知乎 编辑:程序博客网 时间:2024/06/04 19:16

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&timestamp=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
阅读全文
0 0
原创粉丝点击