Reputation: 1441
I intercepted the connection between Zookeeper server and the client node using a custom TCP Monitor (Similar to TCPMon). I stopped the TCPMon and restarted it. When I restarted the TCPMon after the session expiration the client node is notified ("session has expired") but did not reconnect. How can I get it fixed?
Upvotes: 3
Views: 5387
Reputation: 2956
Once you get session expired, you need to close the ZooKeeper handle and re-create it.
From The Programmer's Guide - "once a ZooKeeper object is closed or receives a fatal event (SESSION_EXPIRED and AUTH_FAILED), the ZooKeeper object becomes invalid"
Upvotes: 2