My configuration:
zookeeper: 3.4.10
os: ubuntu 16.04
python: 2.7
kazoo: 2.3.1
When I restarted zookeeper, with bin/zkServer.sh restart
, the shell shows the exception as below:
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