|
This is my configuration file:
tickTime=2000 initLimit=20 syncLimit=5 dataDir=./store/data clientPort=2181 server.1=A:3181:4181 server.2=B:3181:4181 server.3=C:3181:4181 server.4=D:3181:4181 server.5=E:3181:4181 After this, I started all of the servers. Then I started client in one of those nodes. It shows connected but as soon as I enter any command it threw exception and stopped. WatchedEvent state:SyncConnected type:None path:null [zk: 127.0.0.1:2181(CONNECTED) 0] ls / 2012-11-08 22:35:01,418 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1083] - Client session timed out, have not heard from server in 20000ms for sessionid 0x13ae22116e50001, closing socket connection and attempting reconnect WATCHER:: WatchedEvent state:Disconnected type:None path:null 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:1463) at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1491) at org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:725) at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:593) at org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:365) at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:323) at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:282) - Required ports are open (2181, 3181, 4181) - myid is being placed and has correct id corresponding to IP address - Java version: java version "1.7.0_09" Java(TM) SE Runtime Environment (build 1.7.0_09-b05) Any idea whats going on? Thanks in advance. |
|
What version of ZooKeeper are you running? Running version 3.4.4 with Java
7 can cause the kind of issue you're experiencing. Try using Java 6 (from Oracle, OpenJDK experiences the same issues as Java 7), or try running the ZooKeeper 3.4.5 release candidate at http://people.apache.org/~mahadev/zookeeper-3.4.5-candidate-1/ (or wait for the official release). Skye On Thu, Nov 8, 2012 at 3:25 PM, tanzir <[hidden email]>wrote: > This is my configuration file: > > tickTime=2000 > initLimit=20 > syncLimit=5 > dataDir=./store/data > clientPort=2181 > > server.1=A:3181:4181 > server.2=B:3181:4181 > server.3=C:3181:4181 > server.4=D:3181:4181 > server.5=E:3181:4181 > > After this, I started all of the servers. Then I started client in one of > those nodes. It shows connected but as soon as I enter any command it threw > exception and stopped. > > WatchedEvent state:SyncConnected type:None path:null > [zk: 127.0.0.1:2181(CONNECTED) 0] ls / > 2012-11-08 22:35:01,418 [myid:] - INFO > [main-SendThread(localhost:2181):ClientCnxn$SendThread@1083] - Client > session timed out, have not heard from server in 20000ms for sessionid > 0x13ae22116e50001, closing socket connection and attempting reconnect > > WATCHER:: > > WatchedEvent state:Disconnected type:None path:null > 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:1463) > at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1491) > at > org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:725) > at > org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:593) > at > org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:365) > at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:323) > at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:282) > > > > > - Required ports are open (2181, 3181, 4181) > - myid is being placed and has correct id corresponding to IP address > - Java version: java version "1.7.0_09" Java(TM) SE Runtime Environment > (build 1.7.0_09-b05) > > > Any idea whats going on? > > Thanks in advance. > > > > -- > View this message in context: > http://zookeeper-user.578899.n2.nabble.com/Zookeeper-client-exception-when-executing-any-command-in-client-tp7578167.html > Sent from the zookeeper-user mailing list archive at Nabble.com. > |
|
Thanks a lot Skye. You are right. I was using 3.4.4. I thought the issue I was facing might be related to server configuration or zoo configuration, didn't think about JVM version! After downgrading my java version to 1.6 (Sun) it worked as expected. Thank you once again, appreciate it.
- Tanzir |
|
In reply to this post by Skye Wanderman-Milne
W dniu 09.11.2012 01:52, Skye Wanderman-Milne pisze:
> What version of ZooKeeper are you running? Running version 3.4.4 with Java > 7 can cause the kind of issue you're experiencing. Try using Java 6 (from > Oracle, OpenJDK experiences the same issues as Java 7), or try running the > ZooKeeper 3.4.5 release candidate at > http://people.apache.org/~mahadev/zookeeper-3.4.5-candidate-1/ (or wait for > the official release). Can you, please, elaborate on what difference between these different JVMs causes ZooKeeper to fail on some of them? BTW, which JIRA issue is linked to this problem? Best regards, -- Tadeusz Andrzej Kadłubowski Dział Rozwoju Technologii Wirtualna Polska S.A. "WIRTUALNA POLSKA" Spolka Akcyjna z siedziba w Gdansku przy ul. Traugutta 115 C, wpisana do Krajowego Rejestru Sadowego - Rejestru Przedsiebiorcow prowadzonego przez Sad Rejonowy Gdansk - Polnoc w Gdansku pod numerem KRS 0000068548, o kapitale zakladowym 67.980.024,00 zlotych oplaconym w calosci oraz Numerze Identyfikacji Podatkowej 957-07-51-216. |
|
I've also noticed that 3.4.4 fails every time I run it (against a 3.4.4)
cluster, but running the 3.4.3 client works every time. On Thu, Nov 15, 2012 at 5:12 AM, Tadeusz Andrzej Kadłubowski < [hidden email]> wrote: > W dniu 09.11.2012 01:52, Skye Wanderman-Milne pisze: > > What version of ZooKeeper are you running? Running version 3.4.4 with Java >> 7 can cause the kind of issue you're experiencing. Try using Java 6 (from >> Oracle, OpenJDK experiences the same issues as Java 7), or try running the >> ZooKeeper 3.4.5 release candidate at >> http://people.apache.org/~**mahadev/zookeeper-3.4.5-**candidate-1/<http://people.apache.org/~mahadev/zookeeper-3.4.5-candidate-1/>(or wait for >> the official release). >> > > Can you, please, elaborate on what difference between these different > JVMs causes ZooKeeper to fail on some of them? BTW, which JIRA issue is > linked to this problem? > > Best regards, > > -- > Tadeusz Andrzej Kadłubowski > Dział Rozwoju Technologii > Wirtualna Polska S.A. > > > > "WIRTUALNA POLSKA" Spolka Akcyjna z siedziba w Gdansku przy ul. Traugutta > 115 C, wpisana do Krajowego Rejestru Sadowego - Rejestru Przedsiebiorcow > prowadzonego przez Sad Rejonowy Gdansk - Polnoc w Gdansku pod numerem KRS > 0000068548, o kapitale zakladowym 67.980.024,00 zlotych oplaconym w calosci > oraz Numerze Identyfikacji Podatkowej 957-07-51-216. > -- http://about.me/BrianTarbox |
| Powered by Nabble | Edit this page |
