guns-gateway 启动报错
来源:3-4 API网关集成Dubbo

hahaha225
2019-05-28
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-05-28 22:58:43.096 ERROR 36656 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.alibaba.dubbo.spring.boot.DubboProviderAutoConfiguration': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to register dubbo://192.168.78.1:20880/com.stylefeng.guns.rest.modular.user.UserAPI?anyhost=true&application=meeting-gateway&dubbo=2.6.0&generic=false&interface=com.stylefeng.guns.rest.modular.user.UserAPI&methods=login&pid=36656&side=provider×tamp=1559055489745 to registry localhost:2181, cause: Failed to register dubbo://192.168.78.1:20880/com.stylefeng.guns.rest.modular.user.UserAPI?anyhost=true&application=meeting-gateway&dubbo=2.6.0&generic=false&interface=com.stylefeng.guns.rest.modular.user.UserAPI&methods=login&pid=36656&side=provider×tamp=1559055489745 to zookeeper zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?application=meeting-gateway&dubbo=2.6.0&interface=com.alibaba.dubbo.registry.RegistryService&pid=36656×tamp=1559055489642, cause: Zookeeper is not connected yet!
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:138) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1694) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at com.stylefeng.guns.rest.GunsRestApplication.main(GunsRestApplication.java:12) ~[classes/:na]
Caused by: java.lang.IllegalStateException: Failed to register dubbo://192.168.78.1:20880/com.stylefeng.guns.rest.modular.user.UserAPI?anyhost=true&application=meeting-gateway&dubbo=2.6.0&generic=false&interface=com.stylefeng.guns.rest.modular.user.UserAPI&methods=login&pid=36656&side=provider×tamp=1559055489745 to registry localhost:2181, cause: Failed to register dubbo://192.168.78.1:20880/com.stylefeng.guns.rest.modular.user.UserAPI?anyhost=true&application=meeting-gateway&dubbo=2.6.0&generic=false&interface=com.stylefeng.guns.rest.modular.user.UserAPI&methods=login&pid=36656&side=provider×tamp=1559055489745 to zookeeper zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?application=meeting-gateway&dubbo=2.6.0&interface=com.alibaba.dubbo.registry.RegistryService&pid=36656×tamp=1559055489642, cause: Zookeeper is not connected yet!
at com.alibaba.dubbo.registry.support.FailbackRegistry.register(FailbackRegistry.java:149) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.registry.integration.RegistryProtocol.register(RegistryProtocol.java:116) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:135) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:66) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:91) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:505) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:357) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:316) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:215) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.spring.boot.DubboProviderAutoConfiguration.initProviderBean(DubboProviderAutoConfiguration.java:84) ~[dubbo-spring-boot-starter-2.0.0.jar:na]
at com.alibaba.dubbo.spring.boot.DubboProviderAutoConfiguration.init(DubboProviderAutoConfiguration.java:45) ~[dubbo-spring-boot-starter-2.0.0.jar:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:308) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
... 18 common frames omitted
Caused by: com.alibaba.dubbo.rpc.RpcException: Failed to register dubbo://192.168.78.1:20880/com.stylefeng.guns.rest.modular.user.UserAPI?anyhost=true&application=meeting-gateway&dubbo=2.6.0&generic=false&interface=com.stylefeng.guns.rest.modular.user.UserAPI&methods=login&pid=36656&side=provider×tamp=1559055489745 to zookeeper zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?application=meeting-gateway&dubbo=2.6.0&interface=com.alibaba.dubbo.registry.RegistryService&pid=36656×tamp=1559055489642, cause: Zookeeper is not connected yet!
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.doRegister(ZookeeperRegistry.java:112) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.registry.support.FailbackRegistry.register(FailbackRegistry.java:136) ~[dubbo-2.6.0.jar:2.6.0]
... 36 common frames omitted
Caused by: java.lang.IllegalStateException: Zookeeper is not connected yet!
at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkClientWrapper.createPersistent(ZkClientWrapper.java:98) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient.createPersistent(ZkclientZookeeperClient.java:61) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient.create(AbstractZookeeperClient.java:63) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient.create(AbstractZookeeperClient.java:57) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient.create(AbstractZookeeperClient.java:57) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient.create(AbstractZookeeperClient.java:57) ~[dubbo-2.6.0.jar:2.6.0]
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.doRegister(ZookeeperRegistry.java:110) ~[dubbo-2.6.0.jar:2.6.0]
... 37 common frames omitted
这里提示 zookeeper没有连上。
我的配置信息都是用的老师的,能提供一下建议么?
写回答
1回答
-
zookeeper启动成功了么, 另外就是192.168这个IP写的对不对
00
相似问题