2 Replies Latest reply on Jan 4, 2008 10:24 PM by mvu

    Instances of JBoss in different machines

    viswanadhvk

      Hi all, I would like to set up multiple instances of JBoss in different machines.

      I mean to say, I want to creat 1 node in my machine, and another node (say node2) in another machine, and want to pull them into cluster.

      Please help me out any link or any steps to do that. I didn't find information regarding this in "http://www.jboss.org/wiki/Wiki.jsp?page=JBossHA".


      Let me briefly explain you, what I did .

      I am using windows XP , and JBoss 4.2.1.


      (1) I changed DefaultPartition to TestPartition at " all\deploy\cluster-service.xml "


      
      <server>
      
       <!-- ==================================================================== -->
       <!-- Cluster Partition: defines cluster -->
       <!-- ==================================================================== -->
      
       <mbean code="org.jboss.ha.framework.server.ClusterPartition"
       name="jboss:service=${jboss.partition.name:TestPartition}">
      
       <!-- Name of the partition being built -->
       <attribute name="PartitionName">${jboss.partition.name:TestPartition}</attribute>
      
      
      


      (2) Even though I am NOT using SFSB (Stateful Session Bean) .

      I modified the below code at cluster-service.xml for "SFSB"

      changed DefaultPartition to TestPartition

      
      
      <!-- ==================================================================== -->
       <!-- HA Session State Service for SFSB -->
       <!-- ==================================================================== -->
      
       <mbean code="org.jboss.ha.hasessionstate.server.HASessionStateService"
       name="jboss:service=HASessionState">
       <depends>jboss:service=Naming</depends>
       <!-- We now inject the partition into the HAJNDI service instead
       of requiring that the partition name be passed -->
       <depends optional-attribute-name="ClusterPartition"
       proxy-type="attribute">jboss:service=${jboss.partition.name:TestPartition}</depends>
       <!-- JNDI name under which the service is bound -->
       <attribute name="JndiName">/HASessionState/Default</attribute>
       <!-- Max delay before cleaning unreclaimed state.
       Defaults to 30*60*1000 => 30 minutes -->
       <attribute name="BeanCleaningDelay">0</attribute>
       </mbean>
      
      




      (3)I modified the "HA-JNDI" also at cluster-service.xml

      changed DefaultPartition to TestPartition

      
      <!-- ==================================================================== -->
       <!-- HA JNDI -->
       <!-- ==================================================================== -->
      
       <mbean code="org.jboss.ha.jndi.HANamingService"
       name="jboss:service=HAJNDI">
       <!-- We now inject the partition into the HAJNDI service instead
       of requiring that the partition name be passed -->
       <depends optional-attribute-name="ClusterPartition"
       proxy-type="attribute">jboss:service=${jboss.partition.name:TestPartition}</depends>
       <!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
       <attribute name="BindAddress">${jboss.bind.address}</attribute>
       <!-- Port on which the HA-JNDI stub is made available -->
      
      
      


      (4) I modified at the "HA-Invokers"

      changed DefaultPartition to TestPartition

      
      <!-- ==================================================================== -->
       <!-- HA Invokers -->
       <!-- ==================================================================== -->
      
       <mbean code="org.jboss.invocation.unified.server.UnifiedInvokerHA"
       name="jboss:service=invoker,type=unifiedha">
       <depends>jboss:service=TransactionManager</depends>
       <depends optional-attribute-name="Connector"
       proxy-type="attribute">jboss.remoting:service=Connector,transport=socket</depends>
       <depends>jboss:service=${jboss.partition.name:TestPartition}</depends>
       </mbean>
      
      
      


      (5) I changed at "Distributed cache invalidation"

      
      <!-- ==================================================================== -->
       <!-- Distributed cache invalidation -->
       <!-- ==================================================================== -->
      
       <mbean code="org.jboss.cache.invalidation.bridges.JGCacheInvalidationBridge"
       name="jboss.cache:service=InvalidationBridge,type=JavaGroups">
       <!-- We now inject the partition into the HAJNDI service instead
       of requiring that the partition name be passed -->
       <depends optional-attribute-name="ClusterPartition"
       proxy-type="attribute">jboss:service=${jboss.partition.name:TestPartition}</depends>
       <depends>jboss.cache:service=InvalidationManager</depends>
       <attribute name="InvalidationManager">jboss.cache:service=InvalidationManager</attribute>
       <attribute name="BridgeName">DefaultJGBridge</attribute>
       </mbean>
      
      
      


      in all the above places I changed the name of the partition name. I changed from DefaultPartition to TestPartition, thats it. Other than that I haven't changed any thing.

      (6) I changed another file called farm-service.xml

      which is at "I changed all\deploy\deploy.last\farm-service.xml"

      
      <!-- ===================================================================== -->
      <!-- -->
      <!-- Sample Farming Service Configuration -->
      <!-- -->
      <!-- ===================================================================== -->
      
      <server>
      
       <mbean code="org.jboss.ha.framework.server.FarmMemberService"
       name="jboss:service=FarmMember,partition=${jboss.partition.name:TestPartition}" >
      
       <!-- We now inject the partition into the HAJNDI service instead
       of requiring that the partition name be passed -->
       <depends optional-attribute-name="ClusterPartition"
       proxy-type="attribute">jboss:service=${jboss.partition.name:TestPartition}</depends>
      
       <depends>jboss.web:service=WebServer</depends>
      
      
      



      (7) I changed this file also

      deploy-hasingleton-service.xml which is at all\deploy\

      If I won't change this file , JBoss server showing error message as this Partition (defaultPartition)that it is not deployed yet in the server.So I need to change this.

      
      <server>
      
       <!--
       |
       | Use the deployer service on the singleton node.
       |
       -->
       <mbean code="org.jboss.ha.singleton.HASingletonController"
       name="jboss.ha:service=HASingletonDeployer">
       <!-- We now inject the partition into the HAJNDI service instead
       of requiring that the partition name be passed -->
       <depends optional-attribute-name="ClusterPartition"
       proxy-type="attribute">jboss:service=${jboss.partition.name:TestPartition}</depends>
      
      
      



      In the above files also I changed only name of the 'partition' from 'DefaultPartition' to 'TestPartition'

      I did the same changes in 2nd machine also.

      Next I started both the machines (one after another, may be 30 secs gap)

      with the below command.

      
      
      run.bat -g ,partition name -u <multicast address> -b <this machine IPaddress> -c all
      
      run.bat -g TestPartition -u 228.1.2.3 -b 166.35.136.77 -c all
      
      



      Same I did for 2nd machine also, Of course IP address of that machine.

      mcast-address and partition names both are same for both machines.

      But both are NOT recognizing each other.

      I also re-started the machines with different start up commands but in vain.

      these are the start up commands

      
      
      run.bat -g TestPartition -u 228.1.2.3 -b CUSTXIRVMRWW5GG -c all
      
      
      run.bat -b 166.35.136.77 -c all --partition=TestPartition -u 228.1.2.3
      
      
      



      Can any body suggest me , what I need to do more. Or please suggest me am I doing any mistake any where.

      Thanks!
      Viswanadh