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");
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)
- locked <0x1017ee88> (a java.lang.Object)
- locked <0x10fa9d30> (a org.jboss.ha.jndi.TreeHead)
- locked <0x10fa6460> (a org.jboss.ha.jndi.HAJNDI)
at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
at $Proxy54.rebind(Unknown Source)
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)
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
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.
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
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?