Reference Link: http://blog.csdn.net/xlgen157387/article/details/52702659
Dubbo provider and consumer are deployed to Tomcat, start provider first, start successfully, restart consumer, and report the following error:
Java.lang.IllegalStateException:Failed to check the status of the service Com.unj.dubbotest.provider.DemoService. No provider available for the service com.unj.dubbotest.provider.DemoService from the URL zookeeper
Detailed errors are as follows:
Ype Exception the org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' dem Oservice ': Factorybean threw exception on object creation; Nested exception is java.lang.IllegalStateException:Failed to check the status of the service Com.unj.dubbotest.provider. Demoservice. No provider available for the service com.unj.dubbotest.provider.DemoService from the URL zookeeper://10.0.3.42:2181/ com.alibaba.dubbo.registry.registryservice?anyhost=true&application=hehe_consumer&check=false& Default.timeout=30000&dubbo=2.5.4&generic=false&interface=com.unj.dubbotest.provider.demoservice &methods=getstr,sayhello,getusers&pid=2821&side=consumer×tamp=1514020985135 to the consumer 0.0.23.54 Use Dubbo version 2.5.4 description The server encountered a internal error that prevented it from fulfilling
This request. Exception org.apache.jasper.jasperexception:org.springframework.beans.factory.beancreationexception:eRror creating Bean with Name ' Demoservice ': Factorybean threw exception on object creation; Nested exception is java.lang.IllegalStateException:Failed to check the status of the service Com.unj.dubbotest.provider. Demoservice. No provider available for the service com.unj.dubbotest.provider.DemoService from the URL zookeeper://10.0.3.42:2181/ com.alibaba.dubbo.registry.registryservice?anyhost=true&application=hehe_consumer&check=false& Default.timeout=30000&dubbo=2.5.4&generic=false&interface=com.unj.dubbotest.provider.demoservice &methods=getstr,sayhello,getusers&pid=2821&side=consumer×tamp=1514020985135 to the consumer 0.0.23.54 use Dubbo version 2.5.4 org.apache.jasper.servlet.JspServletWrapper.handleJspException (
jspservletwrapper.java:561) Org.apache.jasper.servlet.JspServletWrapper.service (jspservletwrapper.java:477) Org.apache.jasper.servlet.JspServlet.serviceJspFile (jspservlet.java:395) Org.apache.jasper.servlet.JspServleT.service (jspservlet.java:339) javax.servlet.http.HttpServlet.service (httpservlet.java:731)
Org.apache.tomcat.websocket.server.WsFilter.doFilter (wsfilter.java:52) root cause Org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' Demoservice ': Factorybean Threw exception on object creation; Nested exception is java.lang.IllegalStateException:Failed to check the status of the service Com.unj.dubbotest.provider. Demoservice. No provider available for the service com.unj.dubbotest.provider.DemoService from the URL zookeeper://10.0.3.42:2181/ com.alibaba.dubbo.registry.registryservice?anyhost=true&application=hehe_consumer&check=false& Default.timeout=30000&dubbo=2.5.4&generic=false&interface=com.unj.dubbotest.provider.demoservice &methods=getstr,sayhello,getusers&pid=2821&side=consumer×tamp=1514020985135 to the consumer 0.0.23.54 use Dubbo version 2.5.4 Org.springframework.beans.factory.support.FactoryBEanregistrysupport$1.run (factorybeanregistrysupport.java:127) java.security.AccessController.doPrivileged ( Native method) Org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean (
factorybeanregistrysupport.java:116) Org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean (
factorybeanregistrysupport.java:91) Org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance ( abstractbeanfactory.java:1288) Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean ( abstractbeanfactory.java:217) Org.springframework.beans.factory.support.AbstractBeanFactory.getBean ( abstractbeanfactory.java:185) Org.springframework.beans.factory.support.AbstractBeanFactory.getBean ( abstractbeanfactory.java:164) Org.springframework.context.support.AbstractApplicationContext.getBean ( abstractapplicationcontext.java:880) Com.alibaba.dubbo.demo.pp.Consumer.getName (Consumer).java:52) Org.apache.jsp.index_jsp._jspservice (index_jsp.java:131) Org.apache.jasper.runtime.HttpJspBase.service (
httpjspbase.java:70) Javax.servlet.http.HttpServlet.service (httpservlet.java:731)
Org.apache.jasper.servlet.JspServletWrapper.service (jspservletwrapper.java:439)
Org.apache.jasper.servlet.JspServlet.serviceJspFile (jspservlet.java:395) Org.apache.jasper.servlet.JspServlet.service (jspservlet.java:339) Javax.servlet.http.HttpServlet.service (
httpservlet.java:731) Org.apache.tomcat.websocket.server.WsFilter.doFilter (wsfilter.java:52) root cause Java.lang.IllegalStateException:Failed to check the status of the service Com.unj.dubbotest.provider.DemoService. No provider available for the service com.unj.dubbotest.provider.DemoService from the URL zookeeper://10.0.3.42:2181/ com.alibaba.dubbo.registry.registryservice?anyhost=true&application=hehe_consumer&check=false& Default.timeout=30000&dubbo=2.5.4&generic=false&interface=com.unj.dubbotest.provider.demoservice&methods=getstr,sayhello,getusers&pid=2821&side=consumer& timestamp=1514020985135 to the consumer 0.0.23.54 use Dubbo version 2.5.4 Com.alibaba.dubbo.config.ReferenceConfig.cre
Ateproxy (referenceconfig.java:407) com.alibaba.dubbo.config.ReferenceConfig.init (referenceconfig.java:320)
Com.alibaba.dubbo.config.ReferenceConfig.get (referenceconfig.java:159)
Com.alibaba.dubbo.config.spring.ReferenceBean.getObject (referencebean.java:65) Org.springframework.beans.factory.support.factorybeanregistrysupport$1.run (factorybeanregistrysupport.java:121 ) java.security.AccessController.doPrivileged (Native method) Org.springframework.beans.factory.support.FactoryBea
Nregistrysupport.dogetobjectfromfactorybean (factorybeanregistrysupport.java:116) Org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean ( factorybeanregistrysupport.java:91) Org.springframework.beans.factory.support.AbstrActbeanfactory.getobjectforbeaninstance (abstractbeanfactory.java:1288)
Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory.java:217)
Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:185)
Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:164)
Org.springframework.context.support.AbstractApplicationContext.getBean (abstractapplicationcontext.java:880) Com.alibaba.dubbo.demo.pp.Consumer.getName (consumer.java:52) Org.apache.jsp.index_jsp._jspservice (index_
jsp.java:131) Org.apache.jasper.runtime.HttpJspBase.service (httpjspbase.java:70)
Javax.servlet.http.HttpServlet.service (httpservlet.java:731)
Org.apache.jasper.servlet.JspServletWrapper.service (jspservletwrapper.java:439)
Org.apache.jasper.servlet.JspServlet.serviceJspFile (jspservlet.java:395) Org.apache.jasper.servlet.JspServlet.service (jspservlet.java:339) javax.Servlet.http.HttpServlet.service (httpservlet.java:731) Org.apache.tomcat.websocket.server.WsFilter.doFilter ( WSFILTER.JAVA:52) Note the "Full stack" trace of the root cause is available in the Apache tomcat/7.0.73 logs.
The reason is: the machine name points to the intranet IP
The solution is: so you need to change them back to a specific public network IP address, or delete it directly
#1.2.3.4 5941