Environment
- Dubbo version: 2.7.4-SNAPSHOT
- Operating System version: Mac
- Java version: java11
Steps to reproduce this issue
- config in xml like (other config keep the same as the previous version)
<dubbo:registry address="zookeeper://127.0.0.2:2181"/>
<dubbo:config-center address="zookeeper://127.0.0.1:2181"/>
- start the provider application
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
The application can log exception and exit
Actual Result
it will hang the main thread in the method of ZookeeperRegistry.java
@Override
public void doRegister(URL url) {
try {
zkClient.create(toUrlPath(url), url.getParameter(DYNAMIC_KEY, true));
} catch (Throwable e) {
throw new RpcException("Failed to register " + url + " to zookeeper " + getUrl() + ", cause: " + e.getMessage(), e);
}
}
If there is an exception, please attach the exception trace:
Just put your stack trace here!