dubbo在项目运行时报错:

com.alibaba.dubbo.config.spring.AnnotationBean 2019-04-12 03:50:27 [DUBBO] Failed to init remote service reference at filed tbItemDubboServiceImpl in class com.ego.manage.service.impl.TbItemServiceImpl, cause: Failed to check the status of the service com.ego.dubbo.service.TbItemDubboService. No provider available for the service com.ego.dubbo.service.TbItemDubboService from the url zookeeper://192.168.21.128:2181/com.alibaba.dubbo.registry.RegistryService?application=dubbo-manage&dubbo=2.5.3&interface=com.ego.dubbo.service.TbItemDubboService&methods=updItemStatus,show&pid=15716&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1555055418413 to the consumer 192.168.21.1 use dubbo version 2.5.3, dubbo version: 2.5.3, current host: 192.168.21.1
java.lang.IllegalStateException: Failed to check the status of the service com.ego.dubbo.service.TbItemDubboService. No provider available for the service com.ego.dubbo.service.TbItemDubboService from the url zookeeper://192.168.21.128:2181/com.alibaba.dubbo.registry.RegistryService?application=dubbo-manage&dubbo=2.5.3&interface=com.ego.dubbo.service.TbItemDubboService&methods=updItemStatus,show&pid=15716&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1555055418413 to the consumer 192.168.21.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.AnnotationBean.refer(AnnotationBean.java:302)
at com.alibaba.dubbo.config.spring.AnnotationBean.postProcessBeforeInitialization(AnnotationBean.java:233)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
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:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

启动dubbo也是正常的,很无奈不知道怎么回事。XML的路径也对的

1个回答

报错很明显了,找不到**服务提供者**

_No provider available for the service com.ego.dubbo.service.TbItemDubboService from the url zookeeper://192.168.21.128:2181/com.alibaba.dubbo.registry.RegistryService?application=dubbo-manage&dubbo=2.5.3&interface=com.ego.dubbo.service.TbItemDubboService&methods=updItemStatus,show&pid=15716&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1555055418413 to the consumer 192.168.21.1 use dubbo version 2.5.3, dubbo version: 2.5.3, current host: 192.168.21.1 _

试试,在consumer.xml 中将check设置为false

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!