在分布式项目中用Dubbo发生No provider available for the service错误解决方案:

     Failed to check the status of the service com.taotao.service.ItemService. No provider available for the service

原因:

Dubbo默认(缺省)会在启动时检查依赖的服务是否可用,不可用时会抛出异常,阻止Spring初始化完成,以便上线时,能及早发现问题,默认check=true。

如果你的Spring容器是懒加载的,或者通过API编程延迟引用服务,请关闭check,否则服务临时不可用时,会抛出异常,拿到null引用,如果check=false,总是会返回引用,当服务恢复时,能自动连上。

可以通过check=”false”关闭检查,比如,测试时,有些服务不关心,或者出现了循环依赖,必须有一方先启动。

1、关闭某个服务的启动时检查:(没有提供者时报错)
<dubbo:reference interface="com.taotao.ItemService" check="false" />2、关闭所有服务的启动时检查:(没有提供者时报错)  写在定义服务消费者一方
<dubbo:consumer check="false" />3、关闭注册中心启动时检查:(注册订阅失败时报错)
<dubbo:registry check="false" />

【Dubbo】no provider available for the service错误解决方案相关推荐

  1. dubbo+zookeeper与提供者、消费者之间端口通信问题(No provider available for the service)

    一.异常信息分析 Failed to check the status of the service com.sihai.service.ItemService. No provider availa ...

  2. Dubbo学习笔记:No provider available for the service ...异常问题的解决

    刚开始学习dubbo,先跑了一下github上面down下来的demo,开洞zookeeper,运行provider和consumer,实现远程调用.然后就自己敲代码,对逻辑做一点灵活性的改变.我也指 ...

  3. Dubbo Failed to check the status of the service.No provider available for the service from问题解决

    问题描述: Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.serv ...

  4. Dubbo3注册为应用级时报错“No provider available for the service XXX”

    文章目录 Dubbo3注册模式介绍 踩坑记录 Dubbo3注册为应用级时,Nacos注册中心看到注册服务服务和订阅列表均正常,但是实际调用时报错"No provider available ...

  5. Dubbo的Provider配置

    现在我们按照他的一个架构图,注册中心已经配置好,现在只要把Provider搭建出来就可以,在Provider中需要告诉Provider的事情,第一件事情,我需要告诉它,我的注册中心在哪,这点你说应不应 ...

  6. java no provider for_No provider available for the service com.alibaba.

    异常信息如下: ERROR [DubboMonitorSendTimer-thread-1] -  [DUBBO] Unexpected error occur at send statistic,  ...

  7. Failed to check the status of the service. No provider available for the service【已解决】

    关于Failed to check the status of the service com.******.service.ItemService. No provider available fo ...

  8. 解决Mysql:unrecognized service错误的方法(CentOS)附:修改用户名密码

    2019独角兽企业重金招聘Python工程师标准>>> service mysql start出错,mysql启动不了,解决mysql: unrecognized service错误 ...

  9. mysql unrecognized_service mysql start出错,mysql启动不了,解决mysql: unrecognized service错误...

    service mysql start出错,mysql启动不了,解决mysql: unrecognized service错误的方法如下: [root@ctohome.com ~]# service ...

最新文章

  1. 信息熵及其相关概念--数学
  2. mysql 1061原因_MySQL死锁问题分析及解决方法实例详解(转)
  3. R语言伯努利分布(Bernoulli distribution)函数(dbern, pbern, qbern rbern)实战
  4. 安装win7操作系统
  5. python报班大概多少钱-python培训班价格大概多少?
  6. mysql数据库的增删改查命令_MySQL 初识别语句,数据库、表、行的增删改查
  7. windows系统下的python环境的搭建
  8. 基于TensorFlow,人声识别如何在端上实现?
  9. 算法导论-用于不相交集合的数据结构
  10. MATLAB如何修改打开时的默认文件夹或默认路径
  11. 续上节,,基于App布局信息操作手机
  12. PDF格式分析(七十九)——图章、墨迹注释(Stamp、Ink)
  13. 有感:一名大学毕业生的反思:轰动中国万言帖 最露骨大学生活
  14. python程序设计基础上机题5.16-----5.26(2)
  15. docker容器内pip install 显示 warning
  16. Linux--用history查看历史命令如何在history命令时,查看历史命令执行时间
  17. com.google.gson.JsonArray JsonObject JsonParser
  18. window.open 全屏展示
  19. 常微分方程数值解法(1)
  20. c语言中如何将月份转化成英语,把数字月份转化成英文月份 用C++编写

热门文章

  1. 手动制做字体子集(字体文件裁剪、抽取、提取,特别适用处理少量繁体异体字)
  2. 谷歌核心技术(三)Google BigTable中文版
  3. 桌面上什么都没有了怎么调出计算机,电脑开机后桌面上什么都没有是为什么,怎么办...
  4. 手把手教你写一个串口调试助手
  5. 如何判断示波器输入信号超限
  6. 99物联 外接IPEX AFW125TO
  7. python 协程详解教程
  8. KMP_??_!!!_~~
  9. 企业人事工资管理系统(源码+数据库+三层架构)
  10. Python获取局域网内可连通的主机ip地址