You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by "RonaldWakeup (via GitHub)" <gi...@apache.org> on 2025/09/06 16:35:00 UTC

[I] A question about connectionTimeout and connection [curator]

RonaldWakeup opened a new issue, #1276:
URL: https://github.com/apache/curator/issues/1276

   Hello, I Use curator as follow:
   CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
   .connectString("xxx") //this xxx includes 5 invalid IP address.
   .sessionTimeoutMs(10_000)
   .connectionTimeoutMs(10_000)
   retryPolicy(retryNtimes(3,5000));
   client.start();
   I try to test curator's timeout action when curator first attempt to connect zk server. I think curator(actually internal zookeeper client) will not try to connect server after it retry 3 times and connectionTimeout,but actually I see the log file,zk client seems not controlled by curator? the zk client always throw some exception, such as connectionLossException... never stop until I stop my program. 
   I use curator not long ago, and try to read curator code. But I still can't understand why curator behavior as described above.
   Hope to receive your reply soon.
   Thank you.


-- 
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: commits-unsubscribe@curator.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] A question about connectionTimeout and connection [curator]

Posted by "kezhuw (via GitHub)" <gi...@apache.org>.
kezhuw commented on issue #1276:
URL: https://github.com/apache/curator/issues/1276#issuecomment-3264318813

   > I think curator(actually internal zookeeper client) will not try to connect server after it retry 3 times and connectionTimeout,but actually I see the log file,zk client seems not controlled by curator?
   
   `RetryPolicy` has nothing to do with `start`, it applies only to zookeeper data operations, say `getData`, `setData` and so on.
   You probably should use `Watcher` in zookeeper or `ConnectionStateListener` in curator to receive state change events.
   
   
   > zk client seems not controlled by curator? the zk client always throw some exception, such as connectionLossException... never stop
   
   It is zookeeper's internal behavior. See also [ZOOKEEPER-4508](https://issues.apache.org/jira/browse/ZOOKEEPER-4508), [ZOOKEEPER-4921)(https://issues.apache.org/jira/browse/ZOOKEEPER-4921) and [ZOOKEEPER-4923](https://issues.apache.org/jira/browse/ZOOKEEPER-4923)
   
   > until I stop my program.
   
   Does `client.stop` help ?


-- 
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: commits-unsubscribe@curator.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org