4 Replies Latest reply on Sep 13, 2004 3:27 PM by Duncan McLean

    HA-JNDI bind taking 60s

    Duncan McLean Newbie

      Hello. I've got a two machine cluster set up with JBoss 3.2.5. I'm seeing that once the cluster is properly established binding and unbinding with JNDI always takes 60 seconds. I'm just using the default cluster-service.xml. This used to work properly with 3.2.3. Has anyone else ever seen this? Is there any way to fix it?

      Duncan

        • 1. Re: HA-JNDI bind taking 60s
          Duncan McLean Newbie

          I've got a bit more information on this now, though no solution yet. The problem still exists in 3.2.6RC1. It can be reproduced with the code:

          Properties p = new Properties();
          p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); p.put("java.naming.factory.url.pkgs", "jboss.naming:org.jnp.interfaces");
          p.put("java.naming.provider.url", "jnp://localhost:1100");

          InitialContext ctx = new InitialContext(p);
          ctx.rebind("/name", new String("simple item"));

          If you run this any time after the cluster has been established then the rebind call will take 60s. Notice that I'm connecting to the JNDI on port 1100, the HA-JNDI not the local JNDI on port 1099. Is this wrong for some reason? Like I said in my last post this code worked in 3.2.3. Here's the stack trace for when the machine is blocked.....

          at java.lang.Object.wait(Native Method)
          - waiting on <0x1017ee88> (a java.lang.Object)
          at org.jgroups.blocks.GroupRequest.doExecute(GroupRequest.java:500)
          at org.jgroups.blocks.GroupRequest.execute(GroupRequest.java:183)
          - locked <0x1017ee88> (a java.lang.Object)
          at org.jgroups.blocks.MessageDispatcher.castMessage(MessageDispatcher.java:392)
          at org.jgroups.blocks.RpcDispatcher.callRemoteMethods(RpcDispatcher.java:133)
          at org.jboss.ha.framework.server.HAPartitionImpl.callMethodOnCluster(HAPartitionImpl.java:618)
          at org.jboss.ha.jndi.TreeHead.rebind(TreeHead.java:133)
          - locked <0x10fa9d30> (a org.jboss.ha.jndi.TreeHead)
          at org.jboss.ha.jndi.HAJNDI.rebind(HAJNDI.java:119)
          - locked <0x10fa6460> (a org.jboss.ha.jndi.HAJNDI)
          at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:187)
          at $Proxy54.rebind(Unknown Source)
          at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:441)
          at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:414)
          at com.hcl.simple.SimpleSAR.bind(SimpleSAR.java:194)

          Has anyone seen this? Am I setting up my cluster properly? My testing envoronment is:

          -2 W2K machines on the same router
          -each machine running Jboss 3.2.5 (3.2.6RC1 gives the same result)
          -Java 1.4.2_05

          If you are interested in verifying the behaviour I can send you my SAR and all of its source. If you need more information please let me know. Thanks

          • 2. Re: HA-JNDI bind taking 60s
            Bela Ban Master

            I just ran this with the latest CVS from the 3.2 branch (a.k.a JBoss 3.2.6RC3, and it worked without problems. Are you sure you have a cluster, ie. could you check in jmx-console --> DefaultPartition --> CurrentView attribute should show 2 instances.

            Bela

            • 3. Re: HA-JNDI bind taking 60s
              Duncan McLean Newbie

              Hi Bela, I definitely have a cluster. I didn't check the JMX console, but I can see the logging stating that I have 2 machines in the cluster and they are the machines I am expecting. As well, the above code works just fine until the second machine comes up. As soon as I see the logging stating the cluster has been formed the delays kick in. Is there something I need to do to set up clustering that I am missing? Thanks


              • 4. Re: HA-JNDI bind taking 60s
                Duncan McLean Newbie

                After several days of investigation I finally have something working! The culptrit is VMWare! I have 2 physical machines, one of which has 2 VMWare sessions on it as well. I was doing all of my testing with the host OS and a separate physical machine. When I went into my network setup and disabled the VMWare network adapters on the host OS everything started working.
                I've seem problems like this before with Multicast and VMWare. Is this a problem in JGroups or the way JBoss uses it?