原文:http://www.bubuko.com/infodetail-2250226.html

项目中用dubbo发生:

    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.foo.BarService" check="false" /> 2、关闭所有服务的启动时检查:(没有提供者时报错) 写在定义服务消费者一方
<dubbo:consumer check="false" /> 3、关闭注册中心启动时检查:(注册订阅失败时报错)
<dubbo:registry check="false" />

关于Failed to check the status of the service com.taotao.service.ItemService. No provider available fo的更多相关文章

  1. java.lang.IllegalStateException: Failed to check the status of the service

    java.lang.IllegalStateException: Failed to check the status of the service com.pinyougou.sellergoods ...

  2. dubbo Failed to check the status of the service com.user.service.UserService. No provider available for the service

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'u ...

  3. springboot 报错nested exception is java.lang.IllegalStateException: Failed to check the status of the service xxxService No provider available for the service

    spring: dubbo:#关闭所有服务的启动时检查:(没有提供者时报错) consumer: check: false timeout: 3000

  4. Failed to check the status of the service报错解决

    报这个错误是因为我的application_context.service.xml 文件里的的dubbo声明暴露口时的ref属性写错了. <dubbo:service interface=&qu ...

  5. DTM initialization: failure during startup recovery, retry failed, check segment status (cdbtm.c:1603)

    安装greenplum集群出现以下错误: 20160315:13:49:16:025696 gpinitsystem:h95:jason-[INFO]:-Checking configuration ...

  6. PHP: configure: error: mysql configure failed. Please check config.log for more information.

    为php增加mysql模块时报错 configure: error: mysql configure failed. Please check config.log for more informat ...

  7. [Firmware Warn]: GHES: Failed to read error status block address for hardware error source

    Firmware Warn 问题描述: 系统版本:Ubuntu 12.04 LTS. 系统启动后dmesg打印大量Firmware Warn告警信息到syslog文件中.信息如下: [Firmware ...

  8. nfs服务启动失败:Failed to start NFS status monitor for NFSv2/3 locking..

    今天碰到个问题,服务器重启后,nfs服务就启动不了了,关闭都关不了.查看系统日志报下面的错: Aug 10 17:08:53 prod-r3-slt-s-01 systemd: Started Pre ...

  9. Glufster挂载失败Mount failed. Please check the log file for more details解决办法

    设置两台glusterfs服务器主机名分别为gfs1,gfs2 设置好glusterfs挂载不成功提示如下 Mount failed. Please check the log file for mo ...

随机推荐

  1. Python基础教程2上的一处打印缺陷导致的代码不完整#1

    #1对代码的完善的 出现打印代码处缺陷截图: 图片上可以看到,定义的request根本没有定义它就有了.这个是未定义的,会报错的,这本书印刷问题,这个就是个坑,我也是才发现.花了点时间脱坑. 现在发完 ...

  2. 编写高质量代码:改善Java程序的151个建议 --[52~64]

    编写高质量代码:改善Java程序的151个建议 --[52~64] 推荐使用String直接量赋值 Java为了避免在一个系统中大量产生String对象(为什么会大量产生,因为String字符串是程序 ...

  3. [luogu3709][大爷的字符串题]

    题目链接 题意 一天做到两道这种题目描述如此神仙的题也是够了.真锻炼语文能力. 题目的意思其实就是,给你一个序列,然后每次询问一个区间.使得尽量按照严格上升的顺序从这个区间内取数.如果当前取得数字小于 ...

  4. 通过锁字符串达到控制并发的效果C#

    lock锁的是地址 而.net有内部机制使得相同的字符串内存地址是相同的(new string)除外 下面上实验代码 using System; using System.Collections.Ge ...

  5. C#两个实体之间相同属性的映射

    public static R Mapping<R, T>(T model) { R result = Activator.CreateInstance<R>(); forea ...

  6. 测试利器 Postman

    一.安装 官网:https://www.getpostman.com/ Postman是一个Chrome的一个插件工具,我们可以通过Chrome的应用商店进行进行搜索并安装,安装完成会在桌面上显示一个 ...

  7. 定制kickstart重建CentOS7.5镜像用于U盘引导安装

    有什么问题或者疑惑,可以留言,全力解答. ISO 镜像制作 U 盘安装盘 U盘安装CentOS7.4 U盘实现CentOS7.3全自动安装系统 https://www.cnblogs.com/pany ...

  8. CentOS Bash 命令补全增强软件包 bash-completion

    引言 之前安装的 CentOS 7 是最小化安装,在使用 systemctl 命令进行服务的管理时,经常手动输入相关服务名.如果对一个服务名称不熟悉,这样可以迫使我们记住它,但如果对一个服务名已经很熟 ...

  9. google chrome 浏览器书签丢失问题

    在一次新打开标签页时,电脑卡死,强制重启后打开google chrome 浏览器,发现历史什么的都在,但书签栏全部丢失了 找到 系统盘:\Users\用户名\AppData\Local\Google\ ...

  10. 转:值得收藏!那些鲜为人知的 Mac OS X 技巧

    看到一篇网友整理的比较好的“那些鲜为人知的 Mac OS X 技巧”,转载过来分享给大家!希望能有帮助. 更多专题,可关注小编[磨人的小妖精],查看我的文章,也可上[风云社区 SCOEE],查找和下载 ...