You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@curator.apache.org by Steven Raspudic <st...@gmail.com> on 2017/10/21 17:48:03 UTC

hi

first of all, thanks for the help

I’m using the LeaderSelector (similar to example here
https://github.com/apache/curator/blob/master/curator-examples/src/main/java/leader/ExampleClient.java
)

I notice that if the I am not the leader, and lose and re-establish
connection to the zookeeper cluster, that if and when the leader does go
away, the takeLeadership() method is never called.

So for example at some point as the non-leader, I see the following
messages in the log file:


INFO  [Curator-Framework-0-SendThread(dcl1:2181):ClientCnxn$SendThread@1139]
- Client session timed out, have not heard from server in 40020ms for
sessionid 0x55de032f7a601b1, closing socket connection and attempting
reconnect
INFO  [Curator-Framework-0-EventThread:ConnectionStateManager@228] - State
change: SUSPENDED
INFO  [Curator-Framework-0-SendThread(dcl3:2181):ClientCnxn$SendThread@1015]
- Opening socket connection to server dcl3.
INFO  [Curator-Framework-0-SendThread(dcl3:2181):ClientCnxn$SendThread@882]
- Socket connection established to dcl3, initiating session
INFO  [Curator-Framework-0-SendThread(dcl3:2181):ClientCnxn$SendThread@1297]
- Session establishment complete on server dcl3, sessionid =
0x55de032f7a601b1, negotiated ti>
INFO  [Curator-Framework-0-EventThread:ConnectionStateManager@228] - State
change: RECONNECTED



Some time after the above, the leader (on some other node) exits, but I do
not see the takeLeadership() method called, even though I would expect it
to be called.

I’m using a fairly old version of the curator libs (2.11), is this a known
bug, or is there some subtlety that I am missing ?