From: Benjamin R. <br...@ya...> - 2008-04-24 03:19:38
|
If you are running with just one server, you should be using ZooKeeperServer rather than QuorumPeer. Instantiating things directly should work as long as you use ZooKeeperServer for standalone and QuorumPeer for multiple servers. One gotcha is that there are some fatal errors that cause System.exit(). If we want to support this mode of use, we probably need to make some changes so that it will work better. ben ----- Original Message ---- From: Stefan Groschupf <sg...@10...> To: zoo...@li... Sent: Wednesday, April 23, 2008 3:26:19 PM Subject: [Zookeeper-user] ArithmeticException: / by zero Hi, as discussed yesterday I started the zk server in my code. But I guess I doing something wrong here, since I get this exception. Anyone an idea what I might do wrong? Thanks. Stefan 4/23/08 3:20:34 PM PDT [QuorumPeer.java@284][0]: LOOKING 4/23/08 3:20:34 PM PDT [LeaderElection.java@111][0]: Election tally: 4/23/08 3:20:34 PM PDT [LeaderElection.java@117][0]: 0 -> 1 4/23/08 3:20:34 PM PDT [QuorumPeer.java@309][0]: LEADING 4/23/08 3:20:34 PM PDT [ZooKeeperServer.java@271][0]: Processing snapshot: ./zookepper-data/snapshot.0 4/23/08 3:20:34 PM PDT [QuorumPeer.java@315][0]: : java.lang.ArithmeticException: / by zero at com .yahoo .zookeeper .server .quorum .LeaderZooKeeperServer .getGlobalOutstandingLimit(LeaderZooKeeperServer.java:66) at com.yahoo.zookeeper.server.NIOServerCnxn $Factory.setZooKeeperServer(NIOServerCnxn.java:118) at com.yahoo.zookeeper.server.quorum.Leader.lead(Leader.java:248) at com.yahoo.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java: 312) 4/23/08 3:20:34 PM PDT [Leader.java@297][0]: : java.lang.Exception: shutdown Leader! reason: Forcing shutdown at com.yahoo.zookeeper.server.quorum.Leader.shutdown(Leader.java:297) at com.yahoo.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java: 318) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101tec Inc. Menlo Park, California, USA http://www.101tec.com ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Zookeeper-user mailing list Zoo...@li... https://lists.sourceforge.net/lists/listinfo/zookeeper-user |