原文: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. LVS负载均衡集群(DR)

    -----构建DR模式的LVS群集----- --client---------------------LVS------------------------WEB1----------------- ...

  2. Crash 的文明世界

    题目描述 给一棵树,求以每个点为根时下列式子的值. 题解 当k=1时这就是一个经典的换根dp问题. 所以这道题还是要用换根dp解决. 部分分做法: 考虑转移时是这样的一个形式(图是抄的). 用二项式定 ...

  3. [NOI2018]你的名字(后缀自动机+线段树)

    题目描述 小A 被选为了ION2018 的出题人,他精心准备了一道质量十分高的题目,且已经把除了题目命名以外的工作都做好了. 由于ION 已经举办了很多届,所以在题目命名上也是有规定的,ION 命题手 ...

  4. kafka命令行脚本使用

    zookeeper集群部署:http://www.cnblogs.com/ding2016/p/8280696.html kafka集群部署:http://www.cnblogs.com/ding20 ...

  5. CF341E Candies Game

    题目链接 题意 有\(n\)个盒子,第\(i\)个盒子里面有\(a_i\)个糖果.每次选择两个盒子\(i,j\),假设\(a_i \le a_j\).然后从第\(j\)个盒子中拿出\(a_i\)个糖果 ...

  6. CF1129D Isolation(分块+DP)

    一个很显然的DP方程式:f[i]=Σf[j],其中j<i且在[j+1,i]中出现1次的数不超过k个 乍一看挺神仙的,只会O(n^2),就是对于每个位置从后向前扫一遍,边扫边统计出现1次的数的个数 ...

  7. django基于中间件的IP访问频率控制

    一.中间件的代码 注意:成功时返回的是None,那样才会走视图层,返回httpresponse就直接出去了 import time from django.utils.deprecation impo ...

  8. Day11--Python--函数名,闭包,迭代器

    通过 lst.__iter__()拿到lst.的迭代器 1.函数名第一类对象 函数名就是变量名 1.函数名可以像变量一样互相赋值. 2.可以作为函数的参数,进行传递 3.可以作为返回值返回 4.可以作 ...

  9. SpringBoot整合Freemarker+Mybatis

    开发工具 , 开始 新建工程 .选择Spring Initializr 下一步 下一步,选择需要的组件 ..改一下工程名,Finish ..目录结构 首先,修改pom文件 然后,将applicatio ...

  10. 导出为word文档

    原来用freemarker就可以,真是太简便了.先设计一张文档,然后把要输出的值用freemarker取值表达式获取数据,最后保存为ftl文件,再调整一下就可以了.