dubbo admin 无法启动提示:zookeeper not connected 解决方案

问题描述

dubbo admin 从github上挡下来之后,启动dubbo admin server发现使用无法启动做那个是提示zk 链接超时,看设置相关超时时间应该是没问题,此处暂时没有深入了解底层代码逻辑

有兴趣的可以看一下:

错误提示:zookeeper not connected

错误日志:

2022-02-22 17:03:09.997 ERROR 21688 — [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dubboBootstrapApplicationListener’: Initialization of bean failed; nested exception is java.lang.IllegalStateException: zookeeper not connected
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean 0 ( A b s t r a c t B e a n F a c t o r y . j a v a : 324 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t S i n g l e t o n B e a n R e g i s t r y . g e t S i n g l e t o n ( D e f a u l t S i n g l e t o n B e a n R e g i s t r y . j a v a : 234 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . d o G e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 322 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . g e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 207 ) a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . e v e n t . A b s t r a c t A p p l i c a t i o n E v e n t M u l t i c a s t e r . r e t r i e v e A p p l i c a t i o n L i s t e n e r s ( A b s t r a c t A p p l i c a t i o n E v e n t M u l t i c a s t e r . j a v a : 247 ) a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . e v e n t . A b s t r a c t A p p l i c a t i o n E v e n t M u l t i c a s t e r . g e t A p p l i c a t i o n L i s t e n e r s ( A b s t r a c t A p p l i c a t i o n E v e n t M u l t i c a s t e r . j a v a : 204 ) a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . e v e n t . S i m p l e A p p l i c a t i o n E v e n t M u l t i c a s t e r . m u l t i c a s t E v e n t ( S i m p l e A p p l i c a t i o n E v e n t M u l t i c a s t e r . j a v a : 134 ) a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . e v e n t . S i m p l e A p p l i c a t i o n E v e n t M u l t i c a s t e r . m u l t i c a s t E v e n t ( S i m p l e A p p l i c a t i o n E v e n t M u l t i c a s t e r . j a v a : 127 ) a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . s u p p o r t . A b s t r a c t A p p l i c a t i o n C o n t e x t . r e g i s t e r L i s t e n e r s ( A b s t r a c t A p p l i c a t i o n C o n t e x t . j a v a : 842 ) a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . s u p p o r t . A b s t r a c t A p p l i c a t i o n C o n t e x t . r e f r e s h ( A b s t r a c t A p p l i c a t i o n C o n t e x t . j a v a : 548 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . w e b . s e r v l e t . c o n t e x t . S e r v l e t W e b S e r v e r A p p l i c a t i o n C o n t e x t . r e f r e s h ( S e r v l e t W e b S e r v e r A p p l i c a t i o n C o n t e x t . j a v a : 143 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r e f r e s h ( S p r i n g A p p l i c a t i o n . j a v a : 755 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r e f r e s h ( S p r i n g A p p l i c a t i o n . j a v a : 747 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r e f r e s h C o n t e x t ( S p r i n g A p p l i c a t i o n . j a v a : 402 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 312 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 1247 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 1236 ) a t o r g . a p a c h e . d u b b o . a d m i n . D u b b o A d m i n A p p l i c a t i o n . m a i n ( D u b b o A d m i n A p p l i c a t i o n . j a v a : 34 ) C a u s e d b y : j a v a . l a n g . I l l e g a l S t a t e E x c e p t i o n : z o o k e e p e r n o t c o n n e c t e d a t o r g . a p a c h e . d u b b o . r e m o t i n g . z o o k e e p e r . c u r a t o r . C u r a t o r Z o o k e e p e r C l i e n t . < i n i t > ( C u r a t o r Z o o k e e p e r C l i e n t . j a v a : 87 ) a t o r g . a p a c h e . d u b b o . r e m o t i n g . z o o k e e p e r . c u r a t o r . C u r a t o r Z o o k e e p e r T r a n s p o r t e r . c r e a t e Z o o k e e p e r C l i e n t ( C u r a t o r Z o o k e e p e r T r a n s p o r t e r . j a v a : 26 ) a t o r g . a p a c h e . d u b b o . r e m o t i n g . z o o k e e p e r . A b s t r a c t Z o o k e e p e r T r a n s p o r t e r . c o n n e c t ( A b s t r a c t Z o o k e e p e r T r a n s p o r t e r . j a v a : 69 ) a t o r g . a p a c h e . d u b b o . c o n f i g c e n t e r . s u p p o r t . z o o k e e p e r . Z o o k e e p e r D y n a m i c C o n f i g u r a t i o n . < i n i t > ( Z o o k e e p e r D y n a m i c C o n f i g u r a t i o n . j a v a : 68 ) a t o r g . a p a c h e . d u b b o . c o n f i g c e n t e r . s u p p o r t . z o o k e e p e r . Z o o k e e p e r D y n a m i c C o n f i g u r a t i o n F a c t o r y . c r e a t e D y n a m i c C o n f i g u r a t i o n ( Z o o k e e p e r D y n a m i c C o n f i g u r a t i o n F a c t o r y . j a v a : 43 ) a t o r g . a p a c h e . d u b b o . c o m m o n . c o n f i g . c o n f i g c e n t e r . A b s t r a c t D y n a m i c C o n f i g u r a t i o n F a c t o r y . l a m b d a 0(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:247) at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:204) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:842) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:548) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:755) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402) at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236) at org.apache.dubbo.admin.DubboAdminApplication.main(DubboAdminApplication.java:34) Caused by: java.lang.IllegalStateException: zookeeper not connected at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.<init>(CuratorZookeeperClient.java:87) at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.createZookeeperClient(CuratorZookeeperTransporter.java:26) at org.apache.dubbo.remoting.zookeeper.AbstractZookeeperTransporter.connect(AbstractZookeeperTransporter.java:69) at org.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfiguration.<init>(ZookeeperDynamicConfiguration.java:68) at org.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfigurationFactory.createDynamicConfiguration(ZookeeperDynamicConfigurationFactory.java:43) at org.apache.dubbo.common.config.configcenter.AbstractDynamicConfigurationFactory.lambda 0(AbstractBeanFactory.java:324)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)atorg.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:247)atorg.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:204)atorg.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134)atorg.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)atorg.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:842)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:548)atorg.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:755)atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)atorg.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:312)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1247)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1236)atorg.apache.dubbo.admin.DubboAdminApplication.main(DubboAdminApplication.java:34)Causedby:java.lang.IllegalStateException:zookeepernotconnectedatorg.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.<init>(CuratorZookeeperClient.java:87)atorg.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.createZookeeperClient(CuratorZookeeperTransporter.java:26)atorg.apache.dubbo.remoting.zookeeper.AbstractZookeeperTransporter.connect(AbstractZookeeperTransporter.java:69)atorg.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfiguration.<init>(ZookeeperDynamicConfiguration.java:68)atorg.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfigurationFactory.createDynamicConfiguration(ZookeeperDynamicConfigurationFactory.java:43)atorg.apache.dubbo.common.config.configcenter.AbstractDynamicConfigurationFactory.lambdagetDynamicConfiguration$0(AbstractDynamicConfigurationFactory.java:39)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.apache.dubbo.common.config.configcenter.AbstractDynamicConfigurationFactory.getDynamicConfiguration(AbstractDynamicConfigurationFactory.java:39)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.getDynamicConfiguration(DubboBootstrap.java:1368)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.prepareEnvironment(DubboBootstrap.java:1336)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.startConfigCenter(DubboBootstrap.java:746)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.initialize(DubboBootstrap.java:562)
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.initDubboConfigBeans(DubboBootstrapApplicationListener.java:92)
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.checkCallStackAndInit(DubboBootstrapApplicationListener.java:161)
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.setApplicationContext(DubboBootstrapApplicationListener.java:145)
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:123)
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:100)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:415)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1791)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
… 19 common frames omitted
Caused by: java.lang.IllegalStateException: zookeeper not connected
at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.(CuratorZookeeperClient.java:84)
… 38 common frames omitted

解决方案:调整zk超时时间

dubbo.registry.timeout = 15000
dubbo.metadata-report.timeout= 15000

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值