I tried a sample using zookeeper.I am getting the below logs and my remote service registration is getting locked in host
java.lang.NoClassDefFoundError: javax/management/JMException
at org.apache.zookeeper.server.ZooKeeperServer.registerJMX(ZooKeeperServer.java:345)
at org.apache.zookeeper.server.ZooKeeperServer.startup(ZooKeeperServer.java:371)
at org.apache.zookeeper.server.NIOServerCnxn$Factory.startup(NIOServerCnxn.java:161)
at org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryContainer$4.run(ZooDiscoveryContainer.java:213)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.management.JMException
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 5 more
86 [pool-1-thread-3] INFO org.apache.zookeeper.ZooKeeper - Client environment:zookeeper.version=3.3.0-925362, built on 03/19/2010 18:38 GMT
--------------------------
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1078)
1635 [NIOServerCxn.Factory:
0.0.0.0/0.0.0.0:2001] WARN org.apache.zookeeper.server.NIOServerCnxn - Exception causing close of session 0x0 due to java.io.IOException: ZooKeeperServer not running
1635 [NIOServerCxn.Factory:
0.0.0.0/0.0.0.0:2001] INFO org.apache.zookeeper.server.NIOServerCnxn - Closed socket connection for client /
192.168.1.2:51110 (no session established for client)
1635 [pool-1-thread-2-SendThread(
192.168.1.2:2001)] INFO org.apache.zookeeper.ClientCnxn - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2933 [NIOServerCxn.Factory:
0.0.0.0/0.0.0.0:2001] WARN org.apache.zookeeper.server.NIOServerCnxn - Exception causing close of session 0x0 due to java.io.IOException: ZooKeeperServer not running
2933 [NIOServerCxn.Factory:
0.0.0.0/0.0.0.0:2001] INFO org.apache.zookeeper.server.NIOServerCnxn - Closed socket connection for client /
192.168.1.2:51112 (no session established for client)
2935 [pool-1-thread-2-SendThread(
192.168.1.2:2001)] INFO org.apache.zookeeper.ClientCnxn - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
3811 [pool-1-thread-3-SendThread(
192.168.1.2:2002)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1078)
Before in my environment the same sample was working with jmdns.I just took zookeeper and zookeper provider jar and added in my
bundle.info and commented jmdns.
My vm arguments for host are
-Dzoodiscovery.dataDir=zookeeperdata2 -Dzoodiscovery.clientPort=2001 -Dzoodiscovery.flavor=zoodiscovery.flavor.standalone=
192.168.1.2:2002 -Xms40m -Xmx512m
Thanks and Regards
Abhisek