9 Replies Latest reply on Feb 13, 2003 12:22 PM by bongos

    Clustering does not work with Jboss 3.0.6

    bongos Newbie

      I have set up 2 jboss-3.0.6_tomcat-4.1.18 on two win2k server. Here are the steps I did to install and setup cluster.

      1. remove jboss-net.sar since I am useing tomcat-4.1.18

      2. Edit cluster-service.xml to create cluster ListManagerPartition. I still leave DefaultPartition there.

      3. Edit farm-service.xml to setup hot deployment for partition ListManagerPartition.

      4. edit jboss.xml for my bean to include the tag True

      5. create directory %JBOSS_HOME%/server/all/farm on WIN2h server 1

      6. deploy my entity jar file to %JBOSS_HOME%/server/all/farm on WIN2k server 1

      When I start jboss from WIN2k server 1, I did not see the entity bean deployed. If I moved %JBOSS_HOME%/server/all/farm to %JBOSS_HOME%/server/all/deploy/farm, then the entity bean was deployed to server 1 but it is not to server 2.

      What did I do wrong and I should I do to make clustering work?

      Here is my config.

      cluster-service.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->
      <!-- -->
      <!-- Sample Clustering Service Configuration -->
      <!-- -->
      <!-- ===================================================================== -->






      <!-- ==================================================================== -->
      <!-- Cluster Partition: defines cluster -->
      <!-- ==================================================================== -->

      DefaultPartition




      ListManagerPartition

      true




      <UDP mcast_addr="228.1.2.3" mcast_port="45566"/>




      <VERIFY_SUSPECT timeout="1500" />






      <STATE_TRANSFER />








      <!-- ==================================================================== -->
      <!-- HA Session State Service for SFSB -->
      <!-- ==================================================================== -->


      jboss:service=ListManagerPartition
      /HAPartition/LMService
      ListManagerPartition



      <!-- ==================================================================== -->
      <!-- HA JNDI -->
      <!-- ==================================================================== -->


      jboss:service=ListManagerPartition
      ListManagerPartition
      56789












      ############## farm-service.xml #######

      <?xml version="1.0" encoding="UTF-8"?>



      jboss:service=ListManagerPartition
      jboss.jca:service=LocalTxCM,name=ContentDS
      ListManagerPartition
      ./farm
      jboss.deployment:type=DeploymentScanner,flavor=URL
      jboss.system:service=MainDeployer





      Please help.

        • 1. Re: Clustering does not work with Jboss 3.0.6
          Sacha Labourey Master

          - *dont* create your farm folder under /deploy!!!
          - don't create your farm folder at all: let jboss create it just to be sure
          - are both of the HAPartition correctly started?
          - do you deploy the same cluster-service.xml on both nodes?

          Log file?

          • 2. Re: Clustering does not work with Jboss 3.0.6
            bongos Newbie

            slaboure,

            Thank you for replying and helping me. I have a few more questions.

            1. I removed $JBOSS/server/all/deploy/farm folder.

            2. If I do not create farm folder, then where should I deploy my jar,ear, war files. Should I just deploy them to $JBOSS/server/all/deploy and let Jboss create the farm folder.

            3. Should I change ./farm
            to ./deploy


            4. I did deploy the same cluster-service.xml to both servers.

            5. How can I verify that HAPartition correctly started. I looked in JNDIView and saw HAPartition and ListManagerPartiton there.

            Thanks again.

            • 3. Re: Clustering does not work with Jboss 3.0.6
              bongos Newbie

              slaboure,

              Can you help me again.

              I removed the farm directory and deploy my bean jar to $JBOSS_HOME/server/all/deploy from server1. So server1 JBoss deploys my bean correctly. But I still did not see Jboss replicates my bean to server2.

              1. How can I check to see if HAPartition correctly run for both server1 and server2? I did deploy the same cluster-service.xml to both server1 and server2.

              Please help, I do not know what else can I do to make JBoss replicate my ejb jar to other server.

              Thanks,




              • 5. Re: Clustering does not work with Jboss 3.0.6
                Sacha Labourey Master

                it seems to be ok, try to put your files in server/all/farm and see what happens: it seems to be empty right now

                • 6. Re: Clustering does not work with Jboss 3.0.6
                  bongos Newbie

                  I deploy my ejb jar file to $JBOSS_HOME/server/all/farm but jboss does not deploy to any server. Do you think that may be DHCP problem? I cannot think of anything now.

                  • 7. Re: Clustering does not work with Jboss 3.0.6
                    bongos Newbie

                    another thing is
                    I brought down jboss on both server.
                    delete my ejb jar in ./deploy directory
                    delete ./farm directory
                    start jboss

                    I saw that jboss start farm-service in server.log >>BUT<<
                    I did not see that Jboss create ./farm. I tried to create the ./farm directory and copy my ejb jar file to ./farm. Nothing happens (Jboss does not deploy my ejb jar to either server.)

                    I am trying to obtain static Ip now from my company network group to see if this is DHCP problem. Can you suggest me what else should I look into. my jboss.xml does include clustered tag:

                    <?xml version="1.0" encoding="UTF-8"?>
                    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd">



                    <enterprise-beans>


                    <ejb-name>CodeEJB</ejb-name>
                    <jndi-name>CodeEJBHome</jndi-name>
                    true
                    <cluster-config>
                    <partition-name>ListManagerPartition</partition-name>
                    </cluster-config>


                    </enterprise-beans>

                    <resource-managers>
                    </resource-managers>


                    • 8. Re: Clustering does not work with Jboss 3.0.6
                      bongos Newbie

                      I am sorry that I keep posting and asking for help. I turn on cluster log4j debugging. Attached is the cluster.log and it seems that the cluster is working. I saw these in cluster.log:

                      2003-02-12 11:51:24,606 DEBUG [org.jboss.ha.framework.server.FarmMemberService] Found 1 farmDeployments responses
                      2003-02-12 11:51:24,606 INFO [org.jboss.ha.framework.server.FarmMemberService] **** pullNewDeployments ****
                      2003-02-12 11:51:24,606 INFO [org.jboss.ha.framework.server.FarmMemberService] Started


                      So it seems that FarmMemberServices is running and scanning the URL. But why nothing happens? maybe JavaGroup does not quite well with DHCP. I have not obtained static IPs yet for my servers. Please let me know if something I should look into.

                      Thanks for your help.

                      • 9. Re: Clustering does not work with Jboss 3.0.6
                        bongos Newbie

                        slaboure,

                        Finally, I have made jboss clustering farm service work as expected. By using jmx-console to look at FarmMember service (org.jboss.ha.framework.server.FarmMemberService), I found out that my partion did not join the farm member. It then took me 5 minutes to find out the cause. I added these two depend xml tags to the farm-service.xml and everything works fantastically.

                        jboss:service=ListManagerPartition jboss.jca:service=LocalTxCM,name=ContentDS

                        Also, my jboss servers still have DHCP. Attached is my correct farm-service.xml

                        Thanks for all your helps.