dubbo启动消费者报错:No provider available for the service

SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AsynchronousTaskController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.haj.service.HajFrontUserService com.haj.controller.app.AsynchronousTaskController.hajFrontUserService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hajFrontUserService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.haj.service.HajFrontUserService. No provider available for the service com.haj.service.HajFrontUserService from the url zookeeper://192.168.0.17:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo_consumer&check=false&dubbo=2.5.3&interface=com.haj.service.HajFrontUserService&methods=update,queryById,queryByCount,queryByList,add,getOrderCountByTime,getUserManagerList,getDao,updateUserCancelOrder,updateBySelective,delete,isUserByPhone,updateUserBalancePoints,getUserManagerById&pid=9076&revision=2.0.0&side=consumer&timestamp=1470041682811 to the consumer 192.168.0.7 use dubbo version 2.5.3
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
    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:434)
    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:5016)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1882)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    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:722)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.haj.service.HajFrontUserService com.haj.controller.app.AsynchronousTaskController.hajFrontUserService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hajFrontUserService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.haj.service.HajFrontUserService. No provider available for the service com.haj.service.HajFrontUserService from the url zookeeper://192.168.0.17:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo_consumer&check=false&dubbo=2.5.3&interface=com.haj.service.HajFrontUserService&methods=update,queryById,queryByCount,queryByList,add,getOrderCountByTime,getUserManagerList,getDao,updateUserCancelOrder,updateBySelective,delete,isUserByPhone,updateUserBalancePoints,getUserManagerById&pid=9076&revision=2.0.0&side=consumer&timestamp=1470041682811 to the consumer 192.168.0.7 use dubbo version 2.5.3
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    ... 27 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hajFrontUserService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.haj.service.HajFrontUserService. No provider available for the service com.haj.service.HajFrontUserService from the url zookeeper://192.168.0.17:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo_consumer&check=false&dubbo=2.5.3&interface=com.haj.service.HajFrontUserService&methods=update,queryById,queryByCount,queryByList,add,getOrderCountByTime,getUserManagerList,getDao,updateUserCancelOrder,updateBySelective,delete,isUserByPhone,updateUserBalancePoints,getUserManagerById&pid=9076&revision=2.0.0&side=consumer&timestamp=1470041682811 to the consumer 192.168.0.7 use dubbo version 2.5.3
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1523)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1120)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1044)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
    ... 29 more
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.haj.service.HajFrontUserService. No provider available for the service com.haj.service.HajFrontUserService from the url zookeeper://192.168.0.17:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo_consumer&check=false&dubbo=2.5.3&interface=com.haj.service.HajFrontUserService&methods=update,queryById,queryByCount,queryByList,add,getOrderCountByTime,getUserManagerList,getDao,updateUserCancelOrder,updateBySelective,delete,isUserByPhone,updateUserBalancePoints,getUserManagerById&pid=9076&revision=2.0.0&side=consumer&timestamp=1470041682811 to the consumer 192.168.0.7 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)
    ... 37 more

八月 01, 2016 4:54:49 下午 org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart

遇到这个错误笔者也郁闷了好久,最后终于在 http://www.iteye.com/news/23850 这里找到了答案。原来是因为我服务提供者服务器没有添加20880例外端口,所以程序访问不到。要确定这个问题,大家可以使用 telnet 192.168.0.17 20880 看下端口通不通。

希望能帮到大家!

  • 34
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 12
    评论
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值