<ul dir="auto">
<li>[ √] I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li>[ √] I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.4.1</li>
<li>Operating System version: linux</li>
<li>Java version: 1.8.0_231</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>使用springboot写一个dubbo demo，在本地环境IDEA中运行成功</li>
<li>启动一个jdk镜像，将dubbo demo 的jar包使用docker cp命令拷贝到jdk镜像生成的容器中（或者将dubbo demo构建为docker镜像，该镜像的容器无法运行，报错：连不上zookeeper）</li>
<li>使用java -jar 命令运行jar包，提示连不上zookeeper（使用dubbo版本2.7.3正常！！）</li>
</ol>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">期望dubbo应用能够在docker容器中正常运行</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">dubbo应用无法在docker容器中运行，提示连不上zookeeper</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2019-12-12 09:12:26.462 ERROR 7 --- [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.IllegalStateException: zookeeper not connected
	at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.&lt;init&gt;(CuratorZookeeperClient.java:83) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.createZookeeperClient(CuratorZookeeperTransporter.java:26) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.remoting.zookeeper.support.AbstractZookeeperTransporter.connect(AbstractZookeeperTransporter.java:68) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.remoting.zookeeper.ZookeeperTransporter$Adaptive.connect(ZookeeperTransporter$Adaptive.java) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfiguration.&lt;init&gt;(ZookeeperDynamicConfiguration.java:62) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfigurationFactory.createDynamicConfiguration(ZookeeperDynamicConfigurationFactory.java:37) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.configcenter.AbstractDynamicConfigurationFactory.getDynamicConfiguration(AbstractDynamicConfigurationFactory.java:33) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.AbstractInterfaceConfig.getDynamicConfiguration(AbstractInterfaceConfig.java:315) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.AbstractInterfaceConfig.prepareEnvironment(AbstractInterfaceConfig.java:290) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.AbstractInterfaceConfig.startConfigCenter(AbstractInterfaceConfig.java:280) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.AbstractInterfaceConfig.lambda$null$7(AbstractInterfaceConfig.java:636) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at java.util.Optional.orElseGet(Optional.java:267) ~[na:1.8.0_232]
	at org.apache.dubbo.config.AbstractInterfaceConfig.lambda$useRegistryForConfigIfNecessary$8(AbstractInterfaceConfig.java:620) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at java.util.Optional.ifPresent(Optional.java:159) ~[na:1.8.0_232]
	at org.apache.dubbo.config.AbstractInterfaceConfig.useRegistryForConfigIfNecessary(AbstractInterfaceConfig.java:618) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:208) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.ServiceConfig.checkAndUpdateSubConfigs(ServiceConfig.java:303) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:370) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:336) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:114) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:60) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140) [spring-boot-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
	at com.example.demo.App.main(App.java:15) [classes!/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_232]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_232]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_232]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_232]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [message-service-1.0.0.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [message-service-1.0.0.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [message-service-1.0.0.jar:na]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [message-service-1.0.0.jar:na]
Caused by: java.lang.IllegalStateException: zookeeper not connected
	at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.&lt;init&gt;(CuratorZookeeperClient.java:80) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	... 40 common frames omitted"><pre class="notranslate"><code class="notranslate">2019-12-12 09:12:26.462 ERROR 7 --- [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.IllegalStateException: zookeeper not connected
	at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.&lt;init&gt;(CuratorZookeeperClient.java:83) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.createZookeeperClient(CuratorZookeeperTransporter.java:26) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.remoting.zookeeper.support.AbstractZookeeperTransporter.connect(AbstractZookeeperTransporter.java:68) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.remoting.zookeeper.ZookeeperTransporter$Adaptive.connect(ZookeeperTransporter$Adaptive.java) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfiguration.&lt;init&gt;(ZookeeperDynamicConfiguration.java:62) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfigurationFactory.createDynamicConfiguration(ZookeeperDynamicConfigurationFactory.java:37) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.configcenter.AbstractDynamicConfigurationFactory.getDynamicConfiguration(AbstractDynamicConfigurationFactory.java:33) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.AbstractInterfaceConfig.getDynamicConfiguration(AbstractInterfaceConfig.java:315) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.AbstractInterfaceConfig.prepareEnvironment(AbstractInterfaceConfig.java:290) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.AbstractInterfaceConfig.startConfigCenter(AbstractInterfaceConfig.java:280) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.AbstractInterfaceConfig.lambda$null$7(AbstractInterfaceConfig.java:636) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at java.util.Optional.orElseGet(Optional.java:267) ~[na:1.8.0_232]
	at org.apache.dubbo.config.AbstractInterfaceConfig.lambda$useRegistryForConfigIfNecessary$8(AbstractInterfaceConfig.java:620) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at java.util.Optional.ifPresent(Optional.java:159) ~[na:1.8.0_232]
	at org.apache.dubbo.config.AbstractInterfaceConfig.useRegistryForConfigIfNecessary(AbstractInterfaceConfig.java:618) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:208) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.ServiceConfig.checkAndUpdateSubConfigs(ServiceConfig.java:303) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:370) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:336) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:114) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:60) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) ~[spring-context-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140) [spring-boot-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
	at com.example.demo.App.main(App.java:15) [classes!/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_232]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_232]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_232]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_232]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [message-service-1.0.0.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [message-service-1.0.0.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [message-service-1.0.0.jar:na]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [message-service-1.0.0.jar:na]
Caused by: java.lang.IllegalStateException: zookeeper not connected
	at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.&lt;init&gt;(CuratorZookeeperClient.java:80) ~[dubbo-2.7.4.1.jar!/:2.7.4.1]
	... 40 common frames omitted
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.7</li>
<li>Operating System version: Linux</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>build project with dubbo 2.7.7, the deployed directory's structure should satisfy the requirement of start.sh;</li>
<li>configure the port of application's dubbo protocol using <strong>dubbo.properties</strong>;</li>
<li>run application by start.sh;</li>
</ol>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">The application should be powered successfully.</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">The application have been started, but the shell script is hung.</p>