当前位置: 代码迷 >> 综合 >> dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.<init>(CuratorZookeeperClient.java:83)
  详细解决方案

dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.<init>(CuratorZookeeperClient.java:83)

热度:81   发布时间:2024-02-20 03:25:38.0

解决dubbo启动过程中报错:报错内容如下:

2020-01-19 17:42:30.466 ERROR - [main] org.springframework.boot.SpringApplication.reportFailure(822) | Application run failed
java.lang.IllegalStateException: zookeeper not connectedat org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.<init>(CuratorZookeeperClient.java:83)at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.createZookeeperClient(CuratorZookeeperTransporter.java:26)at org.apache.dubbo.remoting.zookeeper.support.AbstractZookeeperTransporter.connect(AbstractZookeeperTransporter.java:68)at org.apache.dubbo.remoting.zookeeper.ZookeeperTransporter$Adaptive.connect(ZookeeperTransporter$Adaptive.java)at org.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfiguration.<init>(ZookeeperDynamicConfiguration.java:70)at org.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfigurationFactory.createDynamicConfiguration(ZookeeperDynamicConfigurationFactory.java:37)at org.apache.dubbo.common.config.configcenter.AbstractDynamicConfigurationFactory.lambda$getDynamicConfiguration$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.common.config.configcenter.DynamicConfiguration.getDynamicConfiguration(DynamicConfiguration.java:223)at org.apache.dubbo.config.bootstrap.DubboBootstrap.prepareEnvironment(DubboBootstrap.java:815)at org.apache.dubbo.config.bootstrap.DubboBootstrap.startConfigCenter(DubboBootstrap.java:560)at org.apache.dubbo.config.bootstrap.DubboBootstrap.useRegistryAsConfigCenterIfNecessary(DubboBootstrap.java:624)at org.apache.dubbo.config.bootstrap.DubboBootstrap.initialize(DubboBootstrap.java:508)at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:698)at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:52)at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:45)at org.apache.dubbo.config.spring.context.OneTimeExecutionApplicationContextEventListener.onApplicationEvent(OneTimeExecutionApplicationContextEventListener.java:40)at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896)at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552)at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743)at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390)at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203)at cn.mogutrip.base.foundation.shell.Application.main(Application.java:28)

参考了:https://www.cnblogs.com/yaofengdoit/p/12215878.html

如果你的报错与我的类似,那就去看下 超时时间吧,项目里搜索timeout。

我的dubbo版本也是2.7.5,按照参考博文楼主说的,我也去看了一下我的超时时间,竟然只有5000,我直接改成了100000,然后重新发包就好了

解决出错最关键的问题是先确定问题。不过博主说的很有道理,要根据原因去看源码

 

  相关解决方案