Wenbin Du
Wenbin Du

Reputation: 19

kazoo restarted zookeeper, the watch threw an exception

My configuration:

zookeeper: 3.4.10

os: ubuntu 16.04

python: 2.7

kazoo: 2.3.1

The code I run in IPython: enter image description here

When I restarted zookeeper, with bin/zkServer.sh restart, the shell shows the exception as below:

enter image description here

If I delete the watch and replace with a listener, the listener works well.

I don't know why, and I read the info from google and github/kazoo, but I found no explanation of how to solve the problem.

P.S.: Someone said because the session of the client connection expired and was lost, the session_id is not the same with the retry connection when the zookeeper restarts

Upvotes: 0

Views: 282

Answers (1)

Ben Bangert
Ben Bangert

Reputation: 6222

I believe this is related to a bug that was introduced in 2.3.1 from the following PR: https://github.com/python-zk/kazoo/pull/305

This is being looked into, and may be rolled back. In the meantime, try using a pre 2.3 version of kazoo.

Upvotes: 2

Related Questions