java.lang.IllegalStateException: Failed to check the status of the service 的解决办法
问题概述
这个问题是在分布式微服务开发过程中遇到的,其中主要使用的框架包括:
分布式应用程序协调服务 > zookeeper
资源调度和治理中心的管理工具 > dubbo
在进行远程调用其它程序的接口时,一直报错,并提示 “ Failed to check the status of the service ” 未能检查服务的状态,接口调用如下:
Url地址:
zookeeper://192.168.159.148:2181/com.alibaba.dubbo.registry.RegistryService
参数:
application=aiyou-manager-web
dubbo=2.5.3
interface=com.huazai.b2c.aiyou.service.TDubboService
methods=getLocalDate
pid=11320
revision=0.0.1-SNAPSHOT
side=consumer
timestamp=1558255181262
部分截图如下:
具体信息如下:
[code]java.lang.IllegalStateException: Failed to check the status of the service com.huazai.b2c.aiyou.service.TDubboService. No provider available for the service com.huazai.b2c.aiyou.service.TDubboService from the url zookeeper://192.168.159.148:2181/com.alibaba.dubbo.registry.RegistryService?application=aiyou-manager-web&dubbo=2.5.3&interface=com.huazai.b2c.aiyou.service.TDubboService&methods=getLocalDate&pid=11320&revision=0.0.1-SNAPSHOT&side=consumer×tamp=1558255181262 to the consumer 192.168.159.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) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1585) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
解决办法
排查过程及解决办法:
1、首先检查注册中心服务器问题,查看服务器是否正常,是否开启端口或关闭防火墙,保证端口可以 telnet(如果是测试,可以直接关闭防火墙,在生产环境中则需要开启端口策略)。
1、检查调用的接口路径是否错误,在参数中 interface=com.huazai.b2c.aiyou.service.TDubboService,而com.huazai.b2c.aiyou.service.TDubboService就是要远程调用的接口,检查远程或第三发服务提供商接口包路径是否一致(必须保证一致)。
2、检查或通知第三发服务提供商其服务器是否运行正常(必须正常,否则无法正常提供数据)。
好了,关于 java.lang.IllegalStateException: Failed to check the status of the service 的解决办法 就写到这儿了,如果还有什么疑问或遇到什么问题欢迎扫码提问,也可以给我留言哦,我会一一详细的解答的。
歇后语:“ 共同学习,共同进步 ”,也希望大家多多关注CSND的IT社区。
作 者: | 华 仔 |
联系作者: | who.seek.me@java98k.vip |
来 源: | CSDN (Chinese Software Developer Network) |
原 文: | https://blog.csdn.net/Hello_World_QWP/article/details/90344242 |
版权声明: | 本文为博主原创文章,请在转载时务必注明博文出处! |
- java.lang.IllegalStateException: Failed to check the status of the service org.cdc.system.service.S
- dubbo项目启动失败,服务提供者注册失败java.lang.IllegalStateException: Failed to check the status of the service
- Failed to check the status of the service. No provider available for the service【已解决】
- dubbo异常:Failed to check the status of the service . No provider available for the service 解决
- dubbo异常:Failed to check the status of the service . No provider available for the service 解决
- Dubbo中消费端报错Caused by: java.lang.IllegalStateException: Failed to check the status of th
- Dubbo: Failed to check the status of the service . No provider available for the service
- Allocate exception for servlet springmvc java.lang.IllegalStateException: Failed to check the status
- Failed to check the status of the service com.taotao.search.service.SearchItemSerivce. No provider a
- Failed to check the status of the service com.taotao.service.ItemService.
- Spring MVC json报406错误的解决办法 Failed to load resource: the server responded with a status of 406
- Spring MVC json报406错误的解决办法 Failed to load resource: the server responded with a status of 406
- FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.解决办法
- eclipse启动时 failed to create the java virtual machine 解决办法
- java.lang.IllegalStateException: Failed to load ApplicationContext解决办法
- IDEA导入Jquery,报错$ is not define和 Failed to load resource: the server responded with a status of 的解决方法
- 关于Eclipse提示Failed to create the java virtual machine问题解决办法
- 启动Myeclipse报错“Failed to create the Java Virtual Machine”的解决办法
- eclipse启动时 failed to create the java virtual machine 解决办法
- 打开Eclipse时出现"Failed to create the Java Virtual Machine"解决办法