4 Replies Latest reply on Jan 4, 2007 12:00 PM by brian.stansberry

    Running multiple instances of JBoss on one machine: need for

    sjsaunders

      The Wiki page (http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfiguringMultipleJBossInstancesOnOneMachine) on this subject has been updated recently.

      My question relates to multiple instances that are to be members of the same cluster. Previously the Wiki page stated that it was advisable to wait 10-20 seconds between starting the first and second instances, otherwise there was a risk that the instances would consider themselves to be members of separate partitions. This text has been removed. Is this advice now obsolete? I have found that starting two or more JBoss instances simultaneously does not seem to be a problem: each instance considers itself to be the only member of the cluster initially, but they quickly discover each other and the partitions are merged. It would be good to get confirmation from whoever edited the Wiki page that this behaviour can be relied upon.

        • 1. Re: Running multiple instances of JBoss on one machine: need
          sjsaunders

          This is the change to ConfiguringMultipleJBossInstancesOnOneMachine that I am asking about:

          Difference between version 34 and version 33:
          Line 45 was replaced by lines 45-46
          - If you intend to launch multiple JBoss instances on the same machine and have them form a cluster, you might write some kind of script to launch the two instances. It is a good practice to add some kind of pause in your script between the launch of the first instance and the second. 10 to 20 seconds is good.
          + We highly recommend against configurating a cluster using the Service Binding Manager. Instead bind each server instance to a separate ip address (or DNS alias) (bound to the same NIC or not):\\
          + __ e.g. $run.sh -c node1 -b 192.168.4.1 (or -b node1.mycluster.acme.com)
          Removed line 47
          - This is because if both instances are launched simultaneously, they both may decide they are the JGroups coordinator. At this point, you will have two independent clusters of one node each. If this happens, both nodes may begin to start HASingleton services, such as HA-JMS. A few seconds later, the two nodes will discover each other and the two clusters will merge. One of the nodes will no longer be coordinator, and the HASingleton services will be stopped. Stopping a service that's in the middle of starting does not always go cleanly.
          Removed line 49
          - By putting a pause in your startup script, it gives the first node a chance to become coordinator before the second node starts. The second node will then cleanly join the cluster, and no HASingleton services will be started on it.

          • 2. Re: Running multiple instances of JBoss on one machine: need
            brian.stansberry

            The text that was deleted should not have been deleted, and has been restored.

            • 3. Re: Running multiple instances of JBoss on one machine: need

              Hello Brian,

              But as mentioned by you here: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=96634&postdays=0&postorder=asc&start=10 even after merging, the deployments shall not be pulled.

              Just merging would be enough for the users? If the deployments are not pulled after a merge, "pulling deployments" was one of the prime targets for forming a cluster, no?

              I see some contradictions here, please help me understand better.

              Regards,
              Rajesh

              • 4. Re: Running multiple instances of JBoss on one machine: need
                brian.stansberry

                Right, that's one reason why a merge is bad and a clean formation of a cluster is good. Hence the advice to space the startup of the nodes so they cleanly form a cluster should not have been removed from the wiki, and has been restored.