赞
踩
错误信息如下:
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /eclipse
at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)
at com.shm.bigdata.zk.SimpleZkClient.testCreate(SimpleZkClient.java:31)
原因:连接还没有创建完成,就操作节点就会报异常?
解决办法:连接超时时间要设置的足够大
private static final int sessionTimeout = 30000;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。