Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection is not reestablished after ConnectionDropped #39

Closed
srwilson opened this issue Nov 30, 2012 · 2 comments
Closed

Connection is not reestablished after ConnectionDropped #39

srwilson opened this issue Nov 30, 2012 · 2 comments

Comments

@srwilson
Copy link

I encountered this traceback running version 0.7:

Traceback (most recent call last):
  File "/opt/python/lib/python2.7/site-packages/kazoo/protocol/connection.py", line 551, in _send_request
    self._submit(request, connect_timeout, self._xid)
  File "/opt/python/lib/python2.7/site-packages/kazoo/protocol/connection.py", line 223, in _submit
    self._write(int_struct.pack(len(b)) + b, timeout)
  File "/opt/python/lib/python2.7/site-packages/kazoo/protocol/connection.py", line 236, in _write
    sent += bytes_sent
  File "/opt/python/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/opt/python/lib/python2.7/site-packages/kazoo/protocol/connection.py", line 66, in socket_error_handling
    errno.errorcode[e.args[0]])
ConnectionDropped: ('socket connection error: %s', 'EPIPE')

All subsequent zookeeper calls raised ConnectionClosedError.

It seems the the client should attempt to reconnect after a transient connection loss such as this.

@cgordon
Copy link

cgordon commented Dec 10, 2012

We've been seeing this issue as well, but it's very rare. Here is my attempt to fix it, which we are testing now:

#41

@hannosch
Copy link
Contributor

hannosch commented Jan 2, 2013

I fixed this using the patch in #41 - and added a test for the whole thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants