Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> disconnected from zk server upon client start

Copy link to this message
disconnected from zk server upon client start

I'm using the zk Java client to connect to zk server on the localhost.
The client got disconnected right away after the connection is
established and the session got expired. What is the reason that the
server terminates the connection? Is there any flag I should specify
when creating the client? The client is created with:

             zk = new ZooKeeper("", 7000, new Watcher() {
                 public void process(WatchedEvent event) {
                     KeeperState ks = event.getState();
                     logger.debug("zk state:" + ks);
                     if ( ks == KeeperState.SyncConnected ) {
                         logger.debug("zk client connected");
                         com.peaxy.event.Event e = new
com.peaxy.event.Event(EventType.DCS_READY, null);

And the following is the server log:

012-10-10 18:01:20,548 [myid:] - INFO
[NIOServerCxn.Factory:] -
Accepted socket connection from /
2012-10-10 18:01:20,549 [myid:] - INFO
[NIOServerCxn.Factory:] - Client
attempting to renew session 0x13a4d47eea50003 at /
2012-10-10 18:01:20,550 [myid:] - INFO
[NIOServerCxn.Factory:] -
Invalid session 0x13a4d47eea50003 for client /, probably
2012-10-10 18:01:20,551 [myid:] - INFO
[NIOServerCxn.Factory:] - Closed
socket connection for client / which had sessionid