Comments (6)
I've committed a patch for this. The select.select call doesn't raise a timeout exception, but simply returns with three empty lists to signal the error case. I'm raising an explicit handler specific timeout exception instead now. I'm not entirely sure if this works or if more special handling is required. Feedback welcome.
from kazoo.
Thank you. I will try this path in next few days.
from kazoo.
Now, i got new exception:
Exception in thread Thread-14:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/user/venv/lib/python2.7/site-packages/kazoo/protocol/connection.py", line 400, in writer
if self._connect_loop(retry) is False:
File "/home/user/venv/lib/python2.7/site-packages/kazoo/protocol/connection.py", line 444, in _connect_loop
connect_timeout)
File "/home/user/venv/lib/python2.7/site-packages/kazoo/protocol/connection.py", line 572, in _send_request
self._submit(Ping, connect_timeout, PING_XID)
File "/home/user/venv/lib/python2.7/site-packages/kazoo/protocol/connection.py", line 227, in _submit
self._write(int_struct.pack(len(b)) + b, timeout)
File "/home/user/venv/lib/python2.7/site-packages/kazoo/protocol/connection.py", line 242, in _write
raise self.handler.timeout_exception("socket time-out")
TimeoutError: socket time-out
Should we try to reconnect to zookeeper server in _ConnectionHandler::connect_loop? Also, listeners (added with add_listener) didn't receive any events in this case.
from kazoo.
I think _connect_loop
should try like forever until it stopped explicitly. Right now it quits when .retry
raises en error.
from kazoo.
The _write issue should be fixed now, but I'll write a test for read timeouts as well. The same problem should exist there.
from kazoo.
I added the test for socket timeouts in _read. Currently the reader thread shuts down on those (hitting the except Exception as e:
at the end of the while True
loop in the reader
method.
Nothing seems to try to set up a new reader thread, and the original client.get
call just deadlocks :-(
from kazoo.
Related Issues (20)
- Abort in `selector_select` HOT 1
- Make the ReadTheDocs CI check a required check for PR's HOT 1
- New kazoo release to include SSL fixes HOT 4
- Unhandled exception in connection loop when administrator sets system time in past HOT 1
- Documentation of the ZooKeeper wire protocol? HOT 1
- No handlers could be found for logger "kazoo.handlers.threading"
- Switch publishing to using the new Trusted Publishers action HOT 1
- RuntimeError: Invalid error code HOT 5
- KazooClient thread-safety and instance reuse HOT 4
- Zookeeper sequence node overflow causes perpetual re-election HOT 6
- Non-blocking lock acquisition failure can "leak" the ephemeral lock node.
- Zookeeper Server's watch residue
- Connecting to read only zookeeper HOT 1
- Add option to recursively set ACLs
- asyncio support HOT 4
- kazoo/client.py in python2.7 use KazooClient init throw a error HOT 1
- delete() fails with version greater than 2**31-1 HOT 2
- timeout param is not respected HOT 1
- Add support for SNI hostnames
- Connection timeout is not set to client._session_timeout / 1000 / len(client.hosts) in all places HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kazoo.