4 Replies Latest reply on Mar 11, 2015 10:11 AM by rsa13

    mod cluster with apache 2.4 and 1.3.1 Beta2

    rsa13

      I had a working mod cluster installation with JBoss AS 7.2 and upgraded to apache 2.4.  I downloaded mod cluster 1.3.1 Beta2 binaries, its for ubuntu 64, and installed the shared libraries in the /usr/lib/apache2/modules folder.  I had to modify the file /etc/apache2/mods_available/mod_cluster.load so it looks like this:

       

      LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so

      LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so

      LoadModule proxy_ajp_module /usr/lib/apache2/modules/mod_proxy_ajp.so

      LoadModule cluster_slotmem_module /usr/lib/apache2/modules/mod_cluster_slotmem.so

      LoadModule manager_module /usr/lib/apache2/modules/mod_manager.so

      LoadModule proxy_cluster_module /usr/lib/apache2/modules/mod_proxy_cluster.so

      LoadModule advertise_module /usr/lib/apache2/modules/mod_advertise.so

       

      When I run the JBoss instance and start apache, I get this in the JBoss log:

       

      20:16:59,606 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Can't read node: {4}] sending command STATUS to proxy localhost/127.0.0.1:6666, configuration will be reset

       

      And this in the error.log for apache:

       

      [Sun Mar 08 20:18:09.620074 2015] [proxy:error] [pid 20770:tid 140360904746752] (111)Connection refused: AH00957: ajp: attempt to connect to 127.0.0.1:11831 (127.0.0.1) failed

      [Sun Mar 08 20:18:09.620150 2015] [proxy:error] [pid 20770:tid 140360904746752] AH00959: ap_proxy_connect_backend disabling worker for (127.0.0.1) for 60s

      [Sun Mar 08 20:18:09.716750 2015] [proxy:error] [pid 20770:tid 140360921532160] AH00940: ajp: disabled connection for (127.0.0.1)

      [Sun Mar 08 20:18:14.717485 2015] [proxy:error] [pid 20770:tid 140360921532160] AH00940: ajp: disabled connection for (127.0.0.1)

       

      I inherited all this setup so I'm not that clued in on how mod_cluster works, but I am guessing the JBoss tells the mod_cluster on port 6666 about its status, and then mod_cluster does load balancing including that node. But where is it getting the port "11831"  there is nothing running on that port.  Obviously connection refused, there is nothing running on that port.  In standalone.xml I see this:

       

      <socket-binding name="ajp" port="8009"/>


      I think that should mean the ajp port is 8009. 


      Any hints?  Anybody can explain how this works a little better?

        • 1. Re: mod cluster with apache 2.4 and 1.3.1 Beta2
          jfclere

          set loglevel to debug in httpd.conf and look to the CONFIG message you should see in error_log the port of the node.

          • 2. Re: mod cluster with apache 2.4 and 1.3.1 Beta2
            rsa13

            I set the apache2 logging level to debug, but can't make much out of the output of the log.  I see that the CONFIG is for the correct port, which is 8009, but there is still an error in the JBoss log like so:

             

            21:14:23,331 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Can't read node: {4}] sending command STATUS to proxy localhost/127.0.0.1:6666, configuration will be reset

             

            And if I hit the web server it gives a 503 service unavailable

             

            here's the error.log with debug enabled, captured from the point at which I started JBoss, can you see anything else that suggests the problem?

             

            https://www.dropbox.com/s/vdilcetoda1ha6r/error.log?dl=0

            • 3. Re: mod cluster with apache 2.4 and 1.3.1 Beta2
              jfclere

              While looking to the log there seems to be a problem...

              CONFIG processing: "JVMRoute=clouddev-g75vw&Host=127.0.0.1&Maxattempts=1&Port=8009&StickySessionForce=No&Type=ajp&ping=10"

              That looks OK but it seems there is already a node with JVMRoute=clouddev-g75vw in the configuration.

              What do you have in httpd.conf?

              • 4. Re: mod cluster with apache 2.4 and 1.3.1 Beta2
                rsa13

                Here is the apache.conf and mod_cluster.conf.  The apache.conf is the same as installed vanilla with Apache 2.4, no changes I believe, the mod_cluster.conf I inherited from the working project which uses the earlier version of apache and mod_cluster.  I made a small modification to mod_cluster.conf to change the permissions things to "Require all granted" which is the new Apache 2.4 format apparently.  There are other *.conf files in the mods_enabled directory, but they don't seem to be related to anything we are looking at.

                 

                Anyway, anything you can see in this would be greatly appreciated, thx!

                 

                https://www.dropbox.com/s/5xhwmipikywyy1u/apache2.conf?dl=0

                 

                https://www.dropbox.com/s/tsllayj50m7nk1r/mod_cluster.conf?dl=0