dubbo报错没有提供者Caused by: java.lang.IllegalStateException: Failed to check the status of the service

在使用dubbo,分别启动服务层工程和表现层工程的时候,tomcat出现以下报错信息:

Caused by: java.lang.IllegalStateException: Failed to check the status of the service cn.campus.service.ItemService. No provider available for the service cn.campus.service.ItemService from the url zookeeper://192.168.17.129:2181/com.alibaba.dubbo.registry.RegistryService?application=campus-manager-web&dubbo=2.5.3&interface=cn.campus.service.ItemService&methods=getItemList&pid=15668&revision=0.0.1-SNAPSHOT&side=consumer&timeout=30000&timestamp=1549955576947 to the consumer 192.168.17.1 use dubbo version 2.5.3
        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:168)
        ... 43 more

并且dubbo监控中心显示没有提供者

原因:是由于生产者和消费者的xml配置文件中的版本号不一致导致的,要么两个配置文件都有以下version信息,要么都不写,需要统一。

<?xml version="1.0" encoding="UTF-8"?>

解决方案:将生产者和消费者配置文件均加上以上头信息。

解决后刷新监控中心,可以看到服务正常

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值