client connection to cluster with HA-JNDI multicast
kaobe Feb 11, 2004 6:44 AMHello Forum,
I have a little problem connecting my client to a jboss cluster via HA-JNDI.
But first the configuration:
I have two Mac OS X machines where there is one instance of JBoss running with a modified "all" configuration on each. These instances run in an extra cluster-partition
My client runs on a Windows XP machine.
When I address one server explicitly by adding his url in the jndi-properties, everything works fine. My client is able to lookup everything he wants to.
But when I change the url to "" and try to connect to the cluster I get the following stacktrace:
javax.naming.CommunicationException: Failed to connect to server 0.0.0.0:1100. Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 0.0.0.0:1100. Root exception is java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:169)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.(Socket.java:291)
at java.net.Socket.(Socket.java:199)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:186)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1107)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1192)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at de.kaobe.client.TestClient.main(TestClient.java:32)
Now I'm wondering what happens there. I searched for the 0.0.0.0:1100 url in the jboss log and have found it at the start of JBoss. JBoss tells me it is listening on that address with the naming service.
I searched the Forums for this problem but found no answer that helped me. But I have checked the following things that were answered to similar problems:
I checked that all libraries are the same on client and server.
I changed the jndi-properties when adding the properties inside the source as well as the jndi.properties of the client and initiated the lookup with the appropriate call (with or without properties HashMap)
Any help would really be appreciated because I don't know where to get on with changing my environment.
Thank you all for your help in advance,
Peter