Exception in thread "main" org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for -


i trying simple zookeeper example leader election, , error , server doesn't start up. code:

public leaderelection() throws ioexception, interruptedexception, keeperexception {     setzk(new zookeeper("localhost", timeout, this));      /* call gives problem */     stat s = getzk().exists(master, this);      if (s == null) {         getzk().create(master, "this node used election.".getbytes(),                 zoodefs.ids.open_acl_unsafe, createmode.persistent);     }     //wait till syncconnected signal received in process method.     latch.await();      setnodepath(getzk().create(master + node, null /*no data yet*/,             zoodefs.ids.open_acl_unsafe, createmode.ephemeral_sequential)); } 

at exists() call error:

exception in thread "main" org.apache.zookeeper.keeperexception$connectionlossexception: keepererrorcode = connectionloss

please let me know missing. using version 3.4.5 of zk, , time out of 15k.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -