2 Replies Latest reply on Jan 27, 2011 6:24 AM by willemnoorduin

    mod_cluster 1.1.0 + JBoss 5.1

    willemnoorduin

      I have had a successful run in implementing a Apache 2.2 / mod_cluster 1,0 / JBoss 5.1. environment in which two different virtual host in Apache can be connected to different JBoss-AS cluster (I'll post details of my configuration if I have the time). Now I want to move to mod_cluster 1.1 because it takes a lot less configuration and seems more logical.

       

      The Java module mod_cluster.sar/ is easy to understand, allthoughsomeone changed the name of the variables a little (in 1.0 it was

      ${jboss.modcluster.proxyList}, whereas the same variable is known as ${jboss.mod_cluster.proxyList} in 1.1, I hope that dropping the underscore was really necessary here (took a lot of time to spot, though).

       

      Anyway I updated the so files of apache with the ones from mod_cluster-1.1.0.Final-linux2-x64-ssl.tar and started Apache as before. Then I note:

       

      error.log:

       

      [Wed Jan 26 11:19:45 2011] [debug] proxy_util.c(2017): proxy: ajp: has released connection for (145.78.121.33)

      [Wed Jan 26 11:19:48 2011] [debug] mod_manager.c(1610): manager_trans STATUS (/)

      [Wed Jan 26 11:19:48 2011] [debug] mod_manager.c(2239): manager_handler STATUS (/) processing: "JVMRoute=508feb0a-6d0a-3dbe-9cfb-0d29f6b87682&Load=84"

      [Wed Jan 26 11:19:48 2011] [debug] mod_manager.c(1351): Processing STATUS

      [Wed Jan 26 11:19:48 2011] [debug] proxy_util.c(1999): proxy: ajp: has acquired connection for (145.78.121.33)

      [Wed Jan 26 11:19:48 2011] [debug] proxy_util.c(2055): proxy: connecting ajp://145.78.121.33:8209/ to 145.78.121.33:8209

      [Wed Jan 26 11:19:48 2011] [debug] proxy_util.c(2153): proxy: connected ajp://145.78.121.33:8209/ to 145.78.121.33:8209

      [Wed Jan 26 11:19:48 2011] [debug] mod_proxy_cluster.c(703): ajp_cping_cpong: Done

      [Wed Jan 26 11:19:48 2011] [debug] proxy_util.c(2017): proxy: ajp: has released connection for (145.78.121.33)

      [Wed Jan 26 11:19:48 2011] [debug] mod_manager.c(2282): manager_handler STATUS  OK

      [Wed Jan 26 11:19:50 2011] [info] removed PID file /distr/jboss-ews/httpd/run/httpd.pid (pid=26689)

      [Wed Jan 26 11:19:50 2011] [notice] caught SIGTERM, shutting down

       

      (so that is correct, 8209 is indeed the correct port). You also see that it made up a JVMRoute, just as the documentation promissed, but:

       

      [Wed Jan 26 10:59:27 2011] [debug] mod_proxy_cluster.c(609): update_workers_node starting

      [Wed Jan 26 10:59:27 2011] [debug] mod_proxy_cluster.c(624): update_workers_node done

      [Wed Jan 26 11:19:08 2011] [debug] mod_proxy_cluster.c(1182): get_balancer_by_node found context /application3

      [Wed Jan 26 11:19:08 2011] [debug] mod_proxy_cluster.c(1262): get_context_host_balancer: balancer balancer://${jboss.modcluster.balancer} not found

      [Wed Jan 26 11:19:08 2011] [debug] mod_proxy_cluster.c(1182): get_balancer_by_node found context /application3

      [Wed Jan 26 11:19:08 2011] [debug] mod_proxy_cluster.c(1262): get_context_host_balancer: balancer balancer://

      } not found

      [Wed Jan 26 11:19:08 2011] [debug] mod_proxy_cluster.c(1403): proxy: byrequests balancer FAILED

      [Wed Jan 26 11:19:08 2011] [error] proxy: CLUSTER: (balancer://cluster3). All workers are in error state

       

      while:

       

      jboss    25660     1  0 10:40 ?        00:00:00 /bin/sh /distr/jboss/jboss-as/bin/run.sh -c node3 -b 145.78.121.33 -g cluster3 -u 239.255.100.100 -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-02 -Djboss.server.log.dir=/apps/data/node3/logs/ -Djboss.jvmRoute=node3 -Djboss.Domain=domain3 -Djboss.mod_cluster.proxyList=145.78.121.33:80 -Djboss.mod_cluster.balancer=cluster3

      jboss    25702 25660  2 10:40 ?        00:01:02 java -Dprogram.name=run.sh -server -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/distr/jboss/jboss-as/lib/endorsed -classpath /distr/jboss/jboss-as/bin/run.jar org.jboss.Main -c node3 -b 145.78.121.33 -g cluster3 -u 239.255.100.100 -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-02 -Djboss.server.log.dir=/apps/data/node3/logs/ -Djboss.jvmRoute=node3 -Djboss.Domain=domain3 -Djboss.mod_cluster.proxyList=145.78.121.33:80 -Djboss.mod_cluster.balancer=cluster3

       

      The error message suggest the following, after which I am in business:

       

      jboss    28187     1  0 11:27 ?        00:00:00 /bin/sh /distr/jboss/jboss-as/bin/run.sh -c node3 -b 145.78.121.33 -g cluster3 -u 239.255.100.100 -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-02 -Djboss.server.log.dir=/apps/data/node3/logs/ -Djboss.jvmRoute=node3 -Djboss.Domain=domain3 -Djboss.mod_cluster.proxyList=145.78.121.33:80 -Djboss.modcluster.balancer=cluster3

      jboss    28229 28187 24 11:27 ?        00:01:01 java -Dprogram.name=run.sh -server -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/distr/jboss/jboss-as/lib/endorsed -classpath /distr/jboss/jboss-as/bin/run.jar org.jboss.Main -c node3 -b 145.78.121.33 -g cluster3 -u 239.255.100.100 -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-02 -Djboss.server.log.dir=/apps/data/node3/logs/ -Djboss.jvmRoute=node3 -Djboss.Domain=domain3 -Djboss.mod_cluster.proxyList=145.78.121.33:80 -Djboss.modcluster.balancer=cluster3

       

      The question is: why rename all but one variable name between versions (maybe there are more, but I didn't check). Maybe you have forgotten something, but maybe I use the wrong method here). Virtual host is looking like this:

       

      <VirtualHost *:80>
          ServerAdmin teedledum@teteedledum@teedteedledum@teedteedledum@teededteedledum@teedteedledum@teedteedledum@teedteedledum@teedteedledum@teedledeel.org

          DocumentRoot /apps/www.application3.nl/data
          ServerName www.application3.nl:80
          ErrorLog logs/www.application3.nl-error_log
          CustomLog logs/www.application3.nl-access_log combined
          LogLevel debug

          ProxyPass / balancer://cluster3/application3 stickysession=JSESSIONID|jsessionid nofailover=On
          ProxyPassReverse / balancer://cluster3/application3

      </VirtualHost>

       

      which explains the "need" of the balancer parameter here.