it sounds like your host/port may be incorrect. just to be sure you might try using the -server flag:
zkCli.sh -server zkhost:zkport (where zkhost is the hostname of your zkserver and zkport is the port number) you can also check if the server is running by using nc (or telnet): echo stat | nc zkserver zkport On Fri, Aug 26, 2016 at 3:53 AM, Stefano Salmaso < [email protected]> wrote: > Hi all, > we have a strange behaviour using zkCli.sh shell script. > If I I try to connect to a zookeeper instance (we have a cluster) all work > fine.. but using command "ls /" fails! > > $ ./zkCli.sh > /usr/bin/java > Connecting to localhost:2181 > Welcome to ZooKeeper! > JLine support is enabled > [zk: localhost:2181(CONNECTING) 0] ls / > Exception in thread "main" > org.apache.zookeeper.KeeperException$ConnectionLossException: > KeeperErrorCode = ConnectionLoss for / > at > org.apache.zookeeper.KeeperException.create(KeeperException.java:99) > at > org.apache.zookeeper.KeeperException.create(KeeperException.java:51) > at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:2255) > at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:2283) > at org.apache.zookeeper.cli.LsCommand.exec(LsCommand.java:93) > at > org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:674) > at > org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:577) > at > org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:360) > at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:320) > at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:280) > > Now we have (more or less) 34K znodes. We are using ZK as distributed lock > (with curator) > > Any idea about this? > > Thanks > Stefano > > -- > [image: Bravofly Rumbo Group] > > Listed on SIX Swiss Exchange > > *Our websites*: lastminute.com | bravofly.com | volagratis.com | rumbo.es > | > jetcost.com | group.lastminute.com > > This e-mail may contain confidential and/or privileged information. If you > are not the intended recipient (or have received this e-mail in error) > please notify the sender immediately and destroy this e-mail. Any > unauthorized copying, disclosure or distribution of the material in this > e-mail is strictly forbidden and could be a crime. >
