启动 consumer 失败

来源:2-9 Springboot集成注册中心

hahaha225

2019-05-28

报错信息:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-05-28 23:23:54.406 ERROR 34440 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quickstartConsumer' defined in file [C:\Users\Martin\IdeaProjects\Dubbo-Springboot-Zookeeper\consumer\target\classes\com\jiangzh\mooc\springboot\dubbo\consumer\quickstart\QuickstartConsumer.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: quickstartConsumer; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.jiangzh.mooc.springboot.dubbo.ServiceAPI. No provider available for the service com.jiangzh.mooc.springboot.dubbo.ServiceAPI from the url zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?application=dubbo-spring-boot-starter&dubbo=2.6.0&interface=com.jiangzh.mooc.springboot.dubbo.ServiceAPI&methods=sendMessage&pid=34440&register.ip=192.168.78.1&side=consumer&timestamp=1559057003743 to the consumer 192.168.78.1 use dubbo version 2.6.0
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
	at com.jiangzh.mooc.springboot.dubbo.consumer.ConsumerApplication.main(ConsumerApplication.java:15) ~[classes/:na]
Caused by: org.springframework.beans.factory.BeanCreationException: quickstartConsumer; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.jiangzh.mooc.springboot.dubbo.ServiceAPI. No provider available for the service com.jiangzh.mooc.springboot.dubbo.ServiceAPI from the url zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?application=dubbo-spring-boot-starter&dubbo=2.6.0&interface=com.jiangzh.mooc.springboot.dubbo.ServiceAPI&methods=sendMessage&pid=34440&register.ip=192.168.78.1&side=consumer&timestamp=1559057003743 to the consumer 192.168.78.1 use dubbo version 2.6.0
	at com.alibaba.dubbo.spring.boot.DubboConsumerAutoConfiguration$1.postProcessBeforeInitialization(DubboConsumerAutoConfiguration.java:100) ~[dubbo-spring-boot-starter-2.0.0.jar:na]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1754) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	... 14 common frames omitted
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.jiangzh.mooc.springboot.dubbo.ServiceAPI. No provider available for the service com.jiangzh.mooc.springboot.dubbo.ServiceAPI from the url zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?application=dubbo-spring-boot-starter&dubbo=2.6.0&interface=com.jiangzh.mooc.springboot.dubbo.ServiceAPI&methods=sendMessage&pid=34440&register.ip=192.168.78.1&side=consumer&timestamp=1559057003743 to the consumer 192.168.78.1 use dubbo version 2.6.0
	at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:422) ~[dubbo-2.6.0.jar:2.6.0]
	at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:333) ~[dubbo-2.6.0.jar:2.6.0]
	at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:163) ~[dubbo-2.6.0.jar:2.6.0]
	at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:59) ~[dubbo-2.6.0.jar:2.6.0]
	at com.alibaba.dubbo.spring.boot.DubboConsumerAutoConfiguration$1.postProcessBeforeInitialization(DubboConsumerAutoConfiguration.java:89) ~[dubbo-spring-boot-starter-2.0.0.jar:na]
	... 17 common frames omitted
写回答

1回答

Allen

2019-05-29

这个接口的路径与provider一样么

0
1
hahaha225
非常感谢!
2019-05-31
共1条回复

Dubbo主流版本打造仿猫眼项目 理解微服务核心思想

实战Dubbo项目+面试技巧,老司机带你畅游微服务

1410 学习 · 582 问题

查看课程