gavinWithGu opened a new issue #8399: URL: https://github.com/apache/dubbo/issues/8399
- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. - [ ] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate. ### Environment * Dubbo version: 2.7.6 * Operating System version: Windows 10 * Java version: 1.8 * Zookeeper Version: 3.6.2 ### 业务场景: 本地有一个springboot定时任务,每隔几秒钟触发使用dubbo的泛化调用远程的provider服务: 1. 断点调试:`ReferenceConfigCache.getCache().get()` 会触发CuratorZookeeperClient去连接Zookeeper 2. **CuratorZookeeperClient类:**`boolean connected = client.blockUntilConnected(timeout, TimeUnit.MILLISECONDS); `每次返回都为false 3. 但是zookeeper端显示已经连接成功,并且客户端的连接日志也显示的是establishment **zk端口连接情况:**  **客户端zk的连接日志如下:** ``` 2021-08-02 16:17:36.307[org.apache.zookeeper.SaslServerPrincipal][Line:74] [spring-task-SendThread(**.**.**.**:2181)] DEBUG org.apache.zookeeper.SaslServerPrincipal - Canonicalized address to **.**.**.** 2021-08-02 16:17:36.311[org.apache.zookeeper.ClientCnxn$SendThread][Line:1025] [spring-task-SendThread(**.**.**.**:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server **.**.**.**/**.**.**.**:2181. Will not attempt to authenticate using SASL (unknown error) 2021-08-02 16:17:36.321[org.apache.zookeeper.ClientCnxn$SendThread][Line:879] [spring-task-SendThread(**.**.**.**:2181)] INFO org.apache.zookeeper.ClientCnxn - Socket connection established to **.**.**.**/**.**.**.**:2181, initiating session 2021-08-02 16:17:36.324[org.apache.zookeeper.ClientCnxn$SendThread][Line:952] [spring-task-SendThread(**.**.**.**:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Session establishment request sent on **.**.**.**/**.**.**.**:2181 2021-08-02 16:17:36.338[org.apache.zookeeper.ClientCnxn$SendThread][Line:1299] [spring-task-SendThread(**.**.**.**:2181)] INFO org.apache.zookeeper.ClientCnxn - Session establishment complete on server **.**.**.**/**.**.**.**:2181, sessionid = 0x1054f231a03004e, negotiated timeout = 40000 2021-08-02 16:17:36.510[org.apache.zookeeper.ZooKeeper][Line:442] [spring-task-saga1] INFO org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=**.**.**.**:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@d234dc3 2021-08-02 16:17:45.530[org.apache.zookeeper.SaslServerPrincipal][Line:74] [spring-task-SendThread(**.**.**.**:2181)] DEBUG org.apache.zookeeper.SaslServerPrincipal - Canonicalized address to **.**.**.** 2021-08-02 16:17:45.530[org.apache.zookeeper.ClientCnxn$SendThread][Line:1025] [spring-task-SendThread(**.**.**.**:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server **.**.**.**/**.**.**.**:2181. Will not attempt to authenticate using SASL (unknown error) 2021-08-02 16:17:45.541[org.apache.zookeeper.ClientCnxn$SendThread][Line:879] [spring-task-SendThread(**.**.**.**:2181)] INFO org.apache.zookeeper.ClientCnxn - Socket connection established to **.**.**.**/**.**.**.**:2181, initiating session 2021-08-02 16:17:45.541[org.apache.zookeeper.ClientCnxn$SendThread][Line:952] [spring-task-SendThread(**.**.**.**:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Session establishment request sent on **.**.**.**/**.**.**.**:2181 2021-08-02 16:17:45.550[org.apache.zookeeper.ClientCnxn$SendThread][Line:1299] [spring-task-SendThread(**.**.**.**:2181)] INFO org.apache.zookeeper.ClientCnxn - Session establishment complete on server **.**.**.**/**.**.**.**:2181, sessionid = 0x1054f231a03004f, negotiated timeout = 40000 ``` ### 问题: 1. 为什么client.blockUntilConnected() 每次返回都为false(已经设置timeout,无效果) 2. 每次执行一次`ReferenceConfigCache.getCache().get()` ,我看到zk端口连接都会多一个,这个会持续增长(猜测是因为cache里为null,所以每次获取referenceConfig都会新建连接?) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
