7 Replies Latest reply on May 4, 2010 11:42 AM by shambola

    Troubles with Load Balancing Demo Application

      Hi, i'm trying to configure my environment for the LB Demo as in http://www.jboss.org/mod_cluster/demo.html

       

      I have one http server on 10.138.5.10 and two JbossAS, the first on the same server and the other on 10.138.5.11

      In httpd.conf i set:

       

      Listen 10.138.5.10:8081
      <VirtualHost 10.138.5.10:8081>

         <Directory />
            Order deny,allow
            Deny from all
            Allow from 10.138.5.
         </Directory>

      KeepAliveTimeout 60
      MaxKeepAliveRequests 0

      ManagerBalancerName mycluster
      AdvertiseFrequency 5

      </VirtualHost>

       

      <Location /manager>
      SetHandler mod_cluster-manager
      Order deny,allow
      </Location>

       

      and in both server.xml:

       

      <Listener className="org.jboss.web.tomcat.service.deployers.MicrocontainerIntegrationLifecycleListener"
              balancer="mycluster"
                  delegateBeanName="ModClusterService"/>

       

      with two routes (node01/02)

       

      Now, on manager i see both nodes, but the second one i start (i've tried to change the order) has always load 0:

       

      screen.jpg

      When i try to use the GUI of LB Demo App, i see only one node, the first i've started. And if i shut down this node, all the clients gone failed.

      So, the load balancing doesn't works.... :-(

       

      What's wrong with my configuration?

       

      Thanks in advance

      Alessandro

        • 1. Re: Troubles with Load Balancing Demo Application
          jfclere

          It seems the second node doesn't start correctly. Check the server.log (boot.log) for errors.

          • 2. Re: Troubles with Load Balancing Demo Application

            Mhhh.. I've done this test:

             

            - Stop of both jboss server

            - Start of 2nd node only

             

            The load on the Mod_cluster Status for the Node 2 was still 0

             

            (i did the restart several times, adn it was always 0)

             

            - Restart of the http server

             

            The load for the Node 2 become 84, but the Load Balancing Demostration fail: all the clients are Failed.

             

            - Start of the 1st node

             

            The load now are:

             

            screen.jpg

             

             

            But the LB Demo works: all the clients are Live.

             

            What does it means?

            And, why this happens after httpd restart?

             

            Thanks in advance!

            • 3. Re: Troubles with Load Balancing Demo Application
              jfclere

              Why load=-1 in one of the nodes... I doubt it works.

              /manager should display both node with Load > 0 if not something wrong on the node with 0 or -1.

              • 4. Re: Troubles with Load Balancing Demo Application

                Hi, i did another experiment.

                 

                Now i have two separate servers, with 2 instances and one load balancer on each:

                 

                - Server1

                     |_Node1

                     |_Node2

                 

                - Server2

                     |_Node3

                     |_Node4

                 

                 

                And i get:

                 

                Node1 Load >  0

                Node2 Load = -1

                 

                Node3 Load = -1

                Node4 Load > 0

                 

                :-(

                 

                In attach, you can find the server.log of node3 and node4

                 

                Thanks in advance...

                Alessandro

                • 5. Re: Troubles with Load Balancing Demo Application
                  jfclere

                  All looks ok on AS side... You will have to set debug in httpd.conf and look in the error_log file to see what is wrong.

                  1 of 1 people found this helpful
                  • 6. Re: Troubles with Load Balancing Demo Application

                    Thank you for the hint!

                     

                    I've set the log level of the http server to "debug".

                    The first node is ok:

                     

                    Start:

                     

                    [Thu Apr 29 18:57:06 2010] [debug] mod_proxy_cluster.c(388): add_balancer_node: Create balancer balancer://TestCluster
                    [Thu Apr 29 18:57:06 2010] [debug] mod_proxy_cluster.c(228): Created: worker for ajp://10.138.5.9:8009
                    [Thu Apr 29 18:57:06 2010] [debug] mod_proxy_cluster.c(323): proxy: initialized single connection worker 1 in child 8770 for (10.138.5.9)
                    [Thu Apr 29 18:57:06 2010] [debug] mod_proxy_cluster.c(364): Created: worker for ajp://10.138.5.9:8009 1 (status): 1
                    [Thu Apr 29 18:57:06 2010] [debug] mod_proxy_cluster.c(606): update_workers_node done
                    [Thu Apr 29 18:57:06 2010] [debug] mod_proxy_cluster.c(587): update_workers_node starting
                    [Thu Apr 29 18:57:06 2010] [debug] mod_proxy_cluster.c(606): update_workers_node done
                    [Thu Apr 29 18:57:06 2010] [debug] mod_proxy_cluster.c(587): update_workers_node starting

                     

                    ...

                    ...

                     

                    Status:

                     

                    [Thu Apr 29 18:58:11 2010] [debug] mod_manager.c(1416): manager_trans STATUS (/)
                    [Thu Apr 29 18:58:11 2010] [debug] mod_manager.c(1929): manager_handler STATUS (/) processing: "JVMRoute=Nodo_01&Load=100"
                    [Thu Apr 29 18:58:11 2010] [debug] proxy_util.c(2044): proxy: ajp: has acquired connection for (10.138.5.9)
                    [Thu Apr 29 18:58:11 2010] [debug] proxy_util.c(2102): proxy: connecting ajp://10.138.5.9:8009/ to 10.138.5.9:8009
                    [Thu Apr 29 18:58:11 2010] [debug] proxy_util.c(2195): proxy: connected ajp://10.138.5.9:8009/ to 10.138.5.9:8009
                    [Thu Apr 29 18:58:11 2010] [debug] mod_proxy_cluster.c(1194): ajp_cping_cpong: Done
                    [Thu Apr 29 18:58:11 2010] [debug] proxy_util.c(2062): proxy: ajp: has released connection for (10.138.5.9)
                    [Thu Apr 29 18:58:11 2010] [debug] mod_manager.c(1970): manager_handler STATUS  OK

                     

                     

                    The second node:

                     

                    Start:

                     

                    [Thu Apr 29 18:59:05 2010] [debug] mod_manager.c(1970): manager_handler STATUS  OK
                    [Thu Apr 29 18:59:13 2010] [debug] mod_manager.c(1416): manager_trans INFO (/)
                    [Thu Apr 29 18:59:13 2010] [debug] mod_manager.c(1929): manager_handler INFO (/) processing: ""
                    [Thu Apr 29 18:59:13 2010] [debug] mod_manager.c(1970): manager_handler INFO  OK
                    [Thu Apr 29 18:59:13 2010] [debug] mod_manager.c(1416): manager_trans CONFIG (/)
                    [Thu Apr 29 18:59:13 2010] [debug] mod_manager.c(1929): manager_handler CONFIG (/) processing: "JVMRoute=Nodo_02&Port=8009&Balancer=TestCluster&Host=10.138.5.11&Type=ajp&StickySessionForce=No"
                    [Thu Apr 29 18:59:13 2010] [debug] mod_manager.c(1970): manager_handler CONFIG  OK
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(587): update_workers_node starting
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(587): update_workers_node starting
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(587): update_workers_node starting
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(587): update_workers_node starting
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(587): update_workers_node starting
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(587): update_workers_node starting
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(587): update_workers_node starting
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(587): update_workers_node starting
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(228): Created: worker for ajp://10.138.5.11:8009
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(323): proxy: initialized single connection worker 2 in child 8778 for (10.138.5.11)
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(364): Created: worker for ajp://10.138.5.11:8009 2 (status): 1
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(228): Created: worker for ajp://10.138.5.11:8009
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(323): proxy: initialized single connection worker 2 in child 8781 for (10.138.5.11)
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(364): Created: worker for ajp://10.138.5.11:8009 2 (status): 1
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(606): update_workers_node done
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(587): update_workers_node starting
                    [Thu Apr 29 18:59:13 2010] [debug] mod_proxy_cluster.c(606): update_workers_node done

                     

                    ...

                    ...

                     

                     

                    But on STATUS:

                     

                    [Thu Apr 29 18:59:33 2010] [debug] mod_manager.c(1416): manager_trans STATUS (/)
                    [Thu Apr 29 18:59:33 2010] [debug] mod_manager.c(1929): manager_handler STATUS (/) processing: "JVMRoute=Nodo_02&Load=100"
                    [Thu Apr 29 18:59:33 2010] [debug] mod_proxy_cluster.c(1318): proxy_cluster_isup: Can't find worker for 2
                    [Thu Apr 29 18:59:33 2010] [debug] mod_manager.c(1970): manager_handler STATUS  OK

                     

                    The interesting thing is that the load status is always >100, but not understood by the server due to the absence of worker 2

                    (that is always the second server i start. If i swap the start order, i obtain the same with second node...)

                     

                    Is this a bug or a misconfiguration of http/as?

                    Thanks again...

                     

                    Alessandro

                    • 7. Re: Troubles with Load Balancing Demo Application

                      Solved, it was a problem with httpd version (2.2.3 instead of 2.2.8+)