7 Replies Latest reply on Feb 25, 2013 4:15 AM by Radoslav Husar

    How to check whether clustering on JBoss AS 7 is working perfect?

    Jayanta Pramanik Newbie

      Hello All,

      Can any one please tell me how to check whether clustering on JBoss AS 7.1.x is working or not ?

      The problem is I have done several steps in order to implement clustering on Jboss with mod_cluster in Apache HTTP server 2.2. I'm running FOUR jboss instances under different port-offset.

       

      The steps are as below -

      in Apache HTTP Server SSL has been implemented:

       

      1. Certificate (.pem and .crt) files are generated and copied under %APACHE_HOME%/conf folder

      2. Required LoadModules lines are copied in httpd.conf file -

       

      LoadModule proxy_module modules/mod_proxy.so

      LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

      LoadModule slotmem_module modules/mod_slotmem.so

      LoadModule manager_module modules/mod_manager.so

      LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

      LoadModule advertise_module modules/mod_advertise.so

      LoadModule proxy_http_module modules/mod_proxy_http.so

      LoadModule ssl_module modules/mod_ssl.so

       

      3. Other changes done as below -

      Include conf/extra/httpd-default.conf

      Include conf/extra/httpd-ssl.conf

       

      the above lines are uncommented.

       

      4. In httpd-ssl.conf file -

      following line is added

      SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.crt"

      SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.pem"

       

      HTTP server was restarted.

       

       

      Changes done in JBoss Server : Changes done in standalone-ha.xml file -

       

      1.  <server name="node1" xmlns="urn:jboss:domain:1.2"> 

           name="nodeX" is mentioned for each of the four node for <server> tag.

       

      2. mod_cluster is configured:

             <subsystem xmlns="urn:jboss:domain:modcluster:1.0">

                  <mod-cluster-config advertise-socket="modcluster" proxy-list="127.0.0.1:6666">

                      <dynamic-load-provider>

                          <load-metric type="busyness"/>

                      </dynamic-load-provider>

                  </mod-cluster-config>

              </subsystem>

       

      3. Instance Id is mentioned :

          

             <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" instance-id="${jboss.node.name}">

                  <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

                  <virtual-server name="default-host" enable-welcome-root="true">

                      <alias name="localhost"/>

                      <alias name="example.com"/>

                  </virtual-server>

             </subsystem>

       

      4. An application WAR is copied to %JBOSS_HOME%/standalone/deployment/  for each instance of jboss.

      As FOUR jboss instances are running each jboss node is started with following commands:  (http port no. is kept same, port-offset is used different)

       

      Node 1) E:/server1/jboss7/bin> standalone.bat -Djboss.node.name=node1 --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=100

      Node 2) E:/server2/jboss7/bin> standalone.bat -Djboss.node.name=node2 --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=200

      Node 3) E:/server3/jboss7/bin> standalone.bat -Djboss.node.name=node3 --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=300

      Node 4) E:/server4/jboss7/bin> standalone.bat -Djboss.node.name=node4 --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=400

       

      Now when I enter "https://localhost/<application>" on browser address bar

      It shows :   localhost:8185/<application>

      And, on shut down that instance again I have to enter the URL : "https://localhost/<application>"

      Here I'm little bit confused whether the configuration is perfect or any further correction is required.

      Can any one please suggest me what else to do? And how to confirm that configuration is done correctly ?

       

      Thanks in advance.

       

      Regards.

       

       

      Jayanta Pramanik