4 Replies Latest reply on Feb 6, 2008 11:14 AM by brian.stansberry

    Simple Clustering Problem

    ops

      Hi everyone,

      I´m stuck in a problem. I installed two freshly unpacked jboss versions (tested with 4.0.2, 4.2.1.GA, 4.0.5.GA, etc.) and started them with -c all -b servername. They find each other in the cluster, there are two servers visible in the partition. ha-jndi is bound to the correct ip-addresses. After that I farmed a simple Stateless EJB-Component to test clustering. Everything works well, both of the servers seem to deploy correctly. But when I start the client, the lookup on Port 1100 and every following method call takes awfully long (up to 3 or 4 Minutes), no matter whether I choose to access the ha-jndi by localhost or the servers dns name. Whenever I stop my second jboss instance, the lookups or calls are very fast and work, when I restart the second server, everything gets slow again. I tested this with a couple of servers and jdks and don´t get it. What am I doing wrong? The answer must be simple, but...

      Regards,
      Oliver

        • 1. Re: Simple Clustering Problem
          ops

          Hi,

          No idea anyone? Could that be a network/multicast problem? On the other hand: the servers recognize each other. And farming seems to work.

          Regards,
          Oliver

          • 2. Re: Simple Clustering Problem
            brian.stansberry

            I'm guessing a network problem unrelated to multicast.

            My interpretation is that your SLSB is deployed on both nodes. For an SLSB, there is no intracluster traffic related to it after it deploys. If it's deployed on all nodes, there is no intra-cluster HA-JNDI traffic related to clients looking it up. Those two facts eliminate a whole range of areas to explore.

            Configure a jndi.properties on your client where you specify the host names of your servers; i.e. don't use HA-JNDI auto discovery

            java.naming.provider.url=host1:1100,host2:1100

            If you do that, there is no multicast at all involved in what you are doing. You're basically downloading a JNDI stub, doing lookups and making invocations that cause no intra-cluster activity on the server side. Not much difference from a non-clustered scenario. Only difference is the JNDI and EJB proxies will spread the calls over both nodes rather than targeting only one. If you find you have problems in this scenario, I would look for problems on each node standalone.

            • 3. Re: Simple Clustering Problem
              ops

              Thanks for your help! I finally figured it out! I uninstalled my software firewall (though it was definitely deactivated) and my virus scanner (also definitely deactivated). What can I say? One of them must have blocked something in between the two jboss instances. Now everything works perfectly. I can easyly see that the nodes are switched via round robin. Can you imagine the cause? This took me hours, and I am not smarter than before...

              Regards,
              Oliver

              • 4. Re: Simple Clustering Problem
                brian.stansberry

                It's hard to guess. If my discussion of your environment was right, there should be no intra-cluster traffic after you've deployed the bean. I suspect whatever it was was interfering with communication between the client and one of the servers. But that's just a guess.