-
Notifications
You must be signed in to change notification settings - Fork 392
Description
Expected Behavior
- The default
timeoutis respected. - If specified, the
timeoutis respected.
Actual Behavior
The computers on which the 3 ZK servers run are deliberately OFF. Run the client from a forth computer.
In the client code, define 3 hosts in the KazooClient() statement. The start() statement that follows, cycles through the hosts in about 5 seconds per host. Not 10 as expected.
Setting the timeout in the call to KazooClient() or start() does not change this duration.
Snippet to Reproduce the Problem
zk = KazooClient(hosts='rpi17.local:2181,rpi18.local:2181,rpi19.local:2181') # Adding timeout param does not change behavior
zk.start()` # or zk.start(timeout=15)
Logs with logging in DEBUG mode
Cannot resolve rpi17.local: [Errno 8] nodename nor servname provided, or not known
Cannot resolve rpi18.local: [Errno 8] nodename nor servname provided, or not known
Cannot resolve rpi19.local: [Errno 8] nodename nor servname provided, or not known
Failed connecting to Zookeeper within the connection retry policy.
Traceback (most recent call last):
File "/Users/Dropbox/Idempotent/ZooKeeper/zkMyCli.py", line 441, in
zk.start(timeout=15)
File "/Users/rahav/anaconda3/lib/python3.11/site-packages/kazoo/client.py", line 669, in start
raise self.handler.timeout_exception("Connection time-out")
kazoo.handlers.threading.KazooTimeoutError: Connection time-out
Specifications
- Kazoo version: 2.10.0
- Result of
pip listcommand: kazoo 2.10.0 - Zookeeper version: 3.8.4
- Zookeeper configuration:
- Python version: 3.11.5
- OS: macOS