{"issue":{"state":"open","created_at":"2011-12-12T15:37:11Z","updated_at":"2011-12-12T15:37:11Z","comments":0,"user":{"gravatar_id":"0a1fc541b9d8681ee21af5591766297d","id":14142,"url":"https://api.github.com/users/killme2008","login":"killme2008","avatar_url":"https://secure.gravatar.com/avatar/0a1fc541b9d8681ee21af5591766297d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I and my friend have met such exception occured when creating workers:\r\n\r\norg.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /storm\r\n        at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)\r\n        at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)\r\n        at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:809)\r\n        at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:837)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n        at java.lang.reflect.Method.invoke(Method.java:597)\r\n        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:90)\r\n        at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28) \r\n at backtype.storm.zookeeper$exists_node_QMARK_.invoke(zookeeper.clj:60)\r\n        at backtype.storm.zookeeper$mkdirs.invoke(zookeeper.clj:67)\r\n        at backtype.storm.cluster$mk_distributed_cluster_state.invoke(cluster.clj:23)\r\n        at backtype.storm.daemon.worker$fn__3181$exec_fn__945__auto____3182.invoke(worker.clj:88)\r\n        at clojure.lang.AFn.applyToHelper(AFn.java:187)\r\n        at clojure.lang.AFn.applyTo(AFn.java:151)\r\n        at clojure.core$apply.invoke(core.clj:540)\r\n        at backtype.storm.daemon.worker$fn__3181$mk_worker__3323.doInvoke(worker.clj:84)\r\n        at clojure.lang.RestFn.invoke(RestFn.java:513)\r\n        at backtype.storm.daemon.worker$_main.invoke(worker.clj:269)\r\n        at clojure.lang.AFn.applyToHelper(AFn.java:174)\r\n        at clojure.lang.AFn.applyTo(AFn.java:151)\r\n\r\nIt seems storm doesn't check the KeeperException code  if the error was recoverable and try to re-process it again.The  connection loss exception is a recoverable error which the ZooKeeper handle is still valid and future operations will succeed once the ZooKeeper library can reestablish its connection to ZooKeeper.\r\n\r\nZookeeper error handling please check:\r\n\r\nhttp://wiki.apache.org/hadoop/ZooKeeper/ErrorHandling\r\n\r\nI recommend to use ZkClient:\r\nhttps://github.com/sgroschupf/zkclient\r\n\r\nIt supports IZkStateListener to listen events of zk session state changed.\r\n","assignee":null,"id":2524193,"number":68,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"Storm doesn't handle zookeeper recoverable errors properly","html_url":"https://github.com/nathanmarz/storm/issues/68","closed_at":null,"url":"https://api.github.com/repos/nathanmarz/storm/issues/68","milestone":null},"action":"opened"}