You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Yuhan Zhang <yz...@onescreen.com> on 2011/09/23 23:50:41 UTC

SessionExpiredException. help!

Hi all,

I set the sessionTimeout value to be "Integer.MAX_VALUE" to the constructor
as
 zooKeeper = new ZooKeeper(host, Integer.MAX_VALUE, this);
but reached an "session expired" exception when requesting a create
operation twice on the following line:

lockPath = zooKeeper.create( lockFolder + "/0", new byte[0],
Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL_
SEQUENTIAL);

Exception:
org.apache.zookeeper.KeeperException$SessionExpiredException :
KeeperErrorCode = Session expired for /_lock/0


why does this happen? could anyone give some advice?


Thank you.

Yuhan