GithubHelp home page GithubHelp logo

Comments (6)

hannosch avatar hannosch commented on August 17, 2024

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.

blackwithwhite666 avatar blackwithwhite666 commented on August 17, 2024

Thank you. I will try this path in next few days.

from kazoo.

blackwithwhite666 avatar blackwithwhite666 commented on August 17, 2024

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.

nekto0n avatar nekto0n commented on August 17, 2024

I think _connect_loop should try like forever until it stopped explicitly. Right now it quits when .retry raises en error.

from kazoo.

hannosch avatar hannosch commented on August 17, 2024

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.

hannosch avatar hannosch commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.