0 Replies Latest reply on May 13, 2009 10:47 AM by Jagan Rao

    Communication Exception in JBoss Cluster while connecting th

    Jagan Rao Newbie

      I am using JBoss in clustered mode !!!

      My JBoss running Environment was:

      1. JBoss running with options : -b myhostName -g mypartitionName -c ALL
      2. JBoss is running on Windows XP
      3. System is using Two LAN's(one of them is rendering Video's) where the JBoss server is running.
      4. Client is also running in the same machine.


      If I use Two LAN's(as I mentioned above) I am unable to connect, and my application is throws below Communication Exception

      If I disable the video LAN and restart JBoss server, my application connects with out any Exception.

      I am getting following Exception :

      2009-05-13 19:29:08,912 [ERROR] com.mycomp.mgt.exception.CommunicationException: Unable to connect to the "MyService" Service; Host: MyHostName
      at com.mycomp.dependency.Activator.addConnection(Activator.java:364)
      at com.mycomp.dependency.connection.ConnectionResolver$Reconnector.run(ConnectionResolver.java:416)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1465)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1582)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at com.mycomp.mgt.MyService.connect(MyService.java:867)
      at com.mycomp.mgt.MyService.(MyService.java:174)
      at com.mycomp.dependency.MyService1.(MyService1.java:62)
      at com.mycomp.dependency.Activator.addConnection(Activator.java:349)
      ... 4 more
      Caused by: java.net.SocketTimeoutException: Receive timed out
      at java.net.PlainDatagramSocketImpl.receive0(Native Method)
      at java.net.PlainDatagramSocketImpl.receive(Unknown Source)
      at java.net.DatagramSocket.receive(Unknown Source)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1435)
      ... 12 more

      My Connction Parameters are :
      Properties props = new Properties();
      props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      props.put("jnp.partitionName", "MY_PARTITION");

      InitialContext ctx;
      ctx = new InitialContext(props);
      MyService connection = (MyService) ctx.lookup("MyServiceImpl/remote");
      System.out.println("Connection : " + connection);
      catch (NamingException anException)
      // TODO Auto-generated catch block

      I am unable to sort it out :(
      Can any body provide/suggest me the solution?
      What's the problem in identifying the partition? and
      How it is related to Network/Number of LAN's on a Computer?