8 Replies Latest reply on Dec 1, 2015 5:57 PM by Radoslav Husar

    Mod_cluster configuration with Jboss 7 and Apache/2.2.3

    Brajendra Singh Newbie

      Hi,

         I am trying to configure clustering using mod_cluster 1.2.0 and  Apache/2.2.3 with jboss 7. below is the output of mod_cluster_manager:

       

      mod_cluster/1.2.0.Final

      Auto Refresh show DUMP output show INFO output

      Node Node4 (ajp://server1:8009):

      Enable Contexts Disable Contexts

      Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 100

      Node Node3 (ajp://server2:8009):

      Enable Contexts Disable Contexts

      Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: -1

       

      Also Following are the configuration at Apache side and Apache installed on server1.

      Listen server1:6677

      <VirtualHost server1:6677>

            <Location />

              Order deny,allow

              Deny from all

              Allow from all

          </Location>

          <Location /mod_cluster_manager>

              SetHandler mod_cluster-manager

              Order deny,allow

              Deny from all

              aLLOW FROM all

          </Location>

          KeepAliveTimeout 60

          MaxKeepAliveRequests 0

       

          ManagerBalancerName mycluster

          ServerAdvertise Off

          EnableMCPMReceive On

      </VirtualHost>

       

      Also added below modules in httpd.conf file:

      # load the mod_cluster modules

      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_balancer_module modules/mod_proxy_balancer.so

       

      Jboss Side configuration:

      1. modcluster subsystem

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

                  <mod-cluster-config advertise="false" advertise-socket="modcluster" connector="ajp" proxy-list="server1:6677">

                      <dynamic-load-provider>

                          <load-metric type="busyness"/>

                      </dynamic-load-provider>

                  </mod-cluster-config>

      </subsystem>

      2.web:2.2 subsystem

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

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

                  <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>

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

                      <alias name="localhost"/>

                      <alias name="example.com"/>

                  </virtual-server>

      </subsystem>

       

      after starting jboss i can access application through direct url (http://server1:8080/index.jsp?locale=en_US&applicationName=admin) but if i am trying to access application through Apache (http://server1:6677/index.jsp?applicationName=admin) then getting below error:

      Not Found

      The requested URL /index.jsp was not found on this server.


      Apache/2.2.3 (Red Hat) Server at kvs-in-hsglap05.in.kronos.com Port 6677
      Pls help me to resolve this issue.

      Thanks in advance!!
        • 1. Re: Mod_cluster configuration with Jboss 7 and Apache/2.2.3
          Michal Karm Babacek Apprentice

          Hi Brajendra,

          first and foremost -- mod_cluster 1.2.0 is extremely dated; it contains serious performance, security and functional issues. The latest in 1.2.x is 1.2.11.

          The Apache HTTP Server version is worse still; the oldest Apache HTTP Server version we have ever worked with with mod_cluster 1.2.x is httpd/2.2.15.

          From some code revisions, I recall that httpd/2.2.8 could compile with 1.1 mod_cluster branch, but having Apache HTTP Server/2.2.3 with mod_cluster 1.2.0 is very weird indeed. What kind of changes in the code you did in order to compile? Were there any?

           

          As to the issue on hand:

          It is clear from the console that the context of your web application is not registered with mod_cluster. That is the reason why it doesn't exist and it cannot be accessed on server1:6677.

           

          To determine why it is the case, I would need to see your error_log on LogLevel Debug.

           

          Call to action:

          • Upgrade
          • Provide error_log

           

          Cheers

          Karm

          1 of 1 people found this helpful
          • 2. Re: Mod_cluster configuration with Jboss 7 and Apache/2.2.3
            Brajendra Singh Newbie

            Hello Karm,

            Thank you so much for looking into it. Pls find below requested details:

             

            mod_cluster upgraded from 1.2.0 to 1.2.6.Final and Apache 2.2.3 to 2.2.15. After configuring mod_cluster and Apache 2.2.15 with Jboss still facing same issue.

             

            Apache error.log in debug mode:


            [Fri Jul 31 17:38:00 2015] [debug] mod_proxy_cluster.c(1366): proxy_cluster_try_pingpong: connected to backend

            [Fri Jul 31 17:38:00 2015] [debug] mod_proxy_cluster.c(1089): ajp_cping_cpong: Done

            [Fri Jul 31 17:38:00 2015] [debug] proxy_util.c(2044): proxy: ajp: has released connection for (Server1)

            [Fri Jul 31 17:38:00 2015] [debug] mod_manager.c(2667): manager_handler STATUS  OK

            [Fri Jul 31 17:38:03 2015] [debug] proxy_util.c(2026): proxy: ajp: has acquired connection for (Server1)

            [Fri Jul 31 17:38:03 2015] [debug] proxy_util.c(2082): proxy: connecting ajp://Server1:8009/ to Server1:8009

            [Fri Jul 31 17:38:03 2015] [debug] proxy_util.c(2209): proxy: connected / to Server1:8009

            [Fri Jul 31 17:38:03 2015] [debug] mod_proxy_cluster.c(1366): proxy_cluster_try_pingpong: connected to backend

            [Fri Jul 31 17:38:03 2015] [debug] mod_proxy_cluster.c(1089): ajp_cping_cpong: Done

            [Fri Jul 31 17:38:03 2015] [debug] proxy_util.c(2044): proxy: ajp: has released connection for (Server1)

            [Fri Jul 31 17:38:08 2015] [debug] proxy_util.c(2026): proxy: ajp: has acquired connection for (Server1)

            [Fri Jul 31 17:38:08 2015] [debug] proxy_util.c(2082): proxy: connecting ajp://Server1:8009/ to Server1:8009

            [Fri Jul 31 17:38:08 2015] [debug] proxy_util.c(2209): proxy: connected / to Server1:8009

            [Fri Jul 31 17:38:08 2015] [debug] mod_proxy_cluster.c(1366): proxy_cluster_try_pingpong: connected to backend

            [Fri Jul 31 17:38:08 2015] [debug] mod_proxy_cluster.c(1089): ajp_cping_cpong: Done

            [Fri Jul 31 17:38:08 2015] [debug] proxy_util.c(2044): proxy: ajp: has released connection for (Server1)

            [Fri Jul 31 17:38:10 2015] [debug] mod_manager.c(1910): manager_trans STATUS

            [Fri Jul 31 17:38:10 2015] [debug] mod_manager.c(2618): manager_handler STATUS processing: "JVMRoute=Node3&Load=100"

            [Fri Jul 31 17:38:10 2015] [debug] mod_manager.c(1625): Processing STATUS

            [Fri Jul 31 17:38:10 2015] [debug] proxy_util.c(2026): proxy: ajp: has acquired connection for (Server1)

            [Fri Jul 31 17:38:10 2015] [debug] proxy_util.c(2082): proxy: connecting ajp://Server1:8009/ to Server1:8009

            [Fri Jul 31 17:38:10 2015] [debug] proxy_util.c(2209): proxy: connected / to Server1:8009

            [Fri Jul 31 17:38:10 2015] [debug] mod_proxy_cluster.c(1366): proxy_cluster_try_pingpong: connected to backend

            [Fri Jul 31 17:38:10 2015] [debug] mod_proxy_cluster.c(1089): ajp_cping_cpong: Done

            [Fri Jul 31 17:38:10 2015] [debug] proxy_util.c(2044): proxy: ajp: has released connection for (Server1)

            [Fri Jul 31 17:38:10 2015] [debug] mod_manager.c(2667): manager_handler STATUS  OK

            [Fri Jul 31 17:38:13 2015] [debug] proxy_util.c(2026): proxy: ajp: has acquired connection for (Server1)

            [Fri Jul 31 17:38:13 2015] [debug] proxy_util.c(2082): proxy: connecting ajp://Server1:8009/ to Server1:8009

            [Fri Jul 31 17:38:13 2015] [debug] proxy_util.c(2209): proxy: connected / to Server1:8009

            [Fri Jul 31 17:38:13 2015] [debug] mod_proxy_cluster.c(1366): proxy_cluster_try_pingpong: connected to backend

            [Fri Jul 31 17:38:13 2015] [debug] mod_proxy_cluster.c(1089): ajp_cping_cpong: Done

            [Fri Jul 31 17:38:13 2015] [debug] proxy_util.c(2044): proxy: ajp: has released connection for (Server1)

            [Fri Jul 31 17:38:18 2015] [debug] proxy_util.c(2026): proxy: ajp: has acquired connection for (Server1)

            [Fri Jul 31 17:38:18 2015] [debug] proxy_util.c(2082): proxy: connecting ajp://Server1:8009/ to Server1:8009

            [Fri Jul 31 17:38:18 2015] [debug] proxy_util.c(2209): proxy: connected / to Server1:8009

            [Fri Jul 31 17:38:18 2015] [debug] mod_proxy_cluster.c(1366): proxy_cluster_try_pingpong: connected to backend

            [Fri Jul 31 17:38:18 2015] [debug] mod_proxy_cluster.c(1089): ajp_cping_cpong: Done

            [Fri Jul 31 17:38:18 2015] [debug] proxy_util.c(2044): proxy: ajp: has released connection for (Server1)

            [Fri Jul 31 17:38:20 2015] [debug] mod_manager.c(1910): manager_trans STATUS

            [Fri Jul 31 17:38:20 2015] [debug] mod_manager.c(2618): manager_handler STATUS processing: "JVMRoute=Node3&Load=100"

            [Fri Jul 31 17:38:20 2015] [debug] mod_manager.c(1625): Processing STATUS

            [Fri Jul 31 17:38:20 2015] [debug] proxy_util.c(2026): proxy: ajp: has acquired connection for (Server1)

            [Fri Jul 31 17:38:20 2015] [debug] proxy_util.c(2082): proxy: connecting ajp://Server1:8009/ to Server1:8009

            [Fri Jul 31 17:38:20 2015] [debug] proxy_util.c(2209): proxy: connected / to Server1:8009

            [Fri Jul 31 17:38:20 2015] [debug] mod_proxy_cluster.c(1366): proxy_cluster_try_pingpong: connected to backend

            [Fri Jul 31 17:38:20 2015] [debug] mod_proxy_cluster.c(1089): ajp_cping_cpong: Done

            [Fri Jul 31 17:38:20 2015] [debug] proxy_util.c(2044): proxy: ajp: has released connection for (Server1)

            [Fri Jul 31 17:38:20 2015] [debug] mod_manager.c(2667): manager_handler STATUS  OK

            [Fri Jul 31 17:38:23 2015] [debug] proxy_util.c(2026): proxy: ajp: has acquired connection for (Server1)

            [Fri Jul 31 17:38:23 2015] [debug] proxy_util.c(2082): proxy: connecting ajp://Server1:8009/ to Server1:8009

            [Fri Jul 31 17:38:23 2015] [debug] proxy_util.c(2209): proxy: connected / to Server1:8009

            [Fri Jul 31 17:38:23 2015] [debug] mod_proxy_cluster.c(1366): proxy_cluster_try_pingpong: connected to backend

            [Fri Jul 31 17:38:23 2015] [debug] mod_proxy_cluster.c(1089): ajp_cping_cpong: Done

            [Fri Jul 31 17:38:23 2015] [debug] proxy_util.c(2044): proxy: ajp: has released connection for (Server1)

            [Fri Jul 31 17:38:28 2015] [debug] proxy_util.c(2026): proxy: ajp: has acquired connection for (Server1)

            [Fri Jul 31 17:38:28 2015] [debug] proxy_util.c(2082): proxy: connecting ajp://Server1:8009/ to Server1:8009

            [Fri Jul 31 17:38:28 2015] [debug] proxy_util.c(2209): proxy: connected / to Server1:8009

            [Fri Jul 31 17:38:28 2015] [debug] mod_proxy_cluster.c(1366): proxy_cluster_try_pingpong: connected to backend

            [Fri Jul 31 17:38:28 2015] [debug] mod_proxy_cluster.c(1089): ajp_cping_cpong: Done

            [Fri Jul 31 17:38:28 2015] [debug] proxy_util.c(2044): proxy: ajp: has released connection for (Server1)

            [Fri Jul 31 17:38:30 2015] [debug] mod_manager.c(1910): manager_trans STATUS

            [Fri Jul 31 17:38:30 2015] [debug] mod_manager.c(2618): manager_handler STATUS processing: "JVMRoute=Node3&Load=100"

            [Fri Jul 31 17:38:30 2015] [debug] mod_manager.c(1625): Processing STATUS

            [Fri Jul 31 17:38:30 2015] [debug] proxy_util.c(2026): proxy: ajp: has acquired connection for (Server1)

            [Fri Jul 31 17:38:30 2015] [debug] proxy_util.c(2082): proxy: connecting ajp://Server1:8009/ to Server1:8009

            [Fri Jul 31 17:38:30 2015] [debug] proxy_util.c(2209): proxy: connected / to Server1:8009

            [Fri Jul 31 17:38:30 2015] [debug] mod_proxy_cluster.c(1366): proxy_cluster_try_pingpong: connected to backend

            [Fri Jul 31 17:38:30 2015] [debug] mod_proxy_cluster.c(1089): ajp_cping_cpong: Done

            [Fri Jul 31 17:38:30 2015] [debug] proxy_util.c(2044): proxy: ajp: has released connection for (Server1)

            [Fri Jul 31 17:38:30 2015] [debug] mod_manager.c(2667): manager_handler STATUS  OK

            [Fri Jul 31 17:38:33 2015] [debug] proxy_util.c(2026): proxy: ajp: has acquired connection for (Server1)

            [Fri Jul 31 17:38:33 2015] [debug] proxy_util.c(2082): proxy: connecting ajp://Server1:8009/ to Server1:8009

            [Fri Jul 31 17:38:33 2015] [debug] proxy_util.c(2209): proxy: connected / to Server1:8009

            [Fri Jul 31 17:38:33 2015] [debug] mod_proxy_cluster.c(1366): proxy_cluster_try_pingpong: connected to backend

            [Fri Jul 31 17:38:33 2015] [debug] mod_proxy_cluster.c(1089): ajp_cping_cpong: Done

            [Fri Jul 31 17:38:33 2015] [debug] proxy_util.c(2044): proxy: ajp: has released connection for (Server1)

             

            JBOSS log:

            12:13:00,973 DEBUG [org.jboss.modcluster] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) MODCLUSTER000009: Sending STATUS for jboss.web

            12:13:10,979 DEBUG [org.jboss.modcluster] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) MODCLUSTER000009: Sending STATUS for jboss.web

            12:13:20,985 DEBUG [org.jboss.modcluster] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) MODCLUSTER000009: Sending STATUS for jboss.web

            12:13:30,991 DEBUG [org.jboss.modcluster] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) MODCLUSTER000009: Sending STATUS for jboss.web

            12:13:41,000 DEBUG [org.jboss.modcluster] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) MODCLUSTER000009: Sending STATUS for jboss.web

             

             

            mod_cluster/1.2.6.Final

            Auto Refresh show DUMP output show INFO output

            Node Node3 (ajp://Server1:8009):

            Enable Contexts Disable Contexts

            Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 100

             

             

            Note:Jboss Installed on Server1 and Apache installed Server2 and all other configuration is same as in my original post.

             

            Pls provide your inputs.

             

            Thanks again!!

             

            Brajendra

            • 3. Re: Mod_cluster configuration with Jboss 7 and Apache/2.2.3
              Brajendra Singh Newbie

              Finally issue resolved, just want to share and may help other.  As Karm pointed out "the context of your web application is not registered with mod_cluster". By adding some context in excluded-contexts in modcluster subsystem.

              excluded-contexts="ROOT,admin-console,invoker,jbossws,jmx-console,juddi,web-console"

               

               

              Thanks

              Brajendra

              • 4. Re: Mod_cluster configuration with Jboss 7 and Apache/2.2.3
                Radoslav Husar Master

                Brajendra Singh wrote:

                 

                Finally issue resolved, just want to share and may help other.  As Karm pointed out "the context of your web application is not registered with mod_cluster". By adding some context in excluded-contexts in modcluster subsystem.

                excluded-contexts="ROOT,admin-console,invoker,jbossws,jmx-console,juddi,web-console"

                 

                 

                Thanks

                Brajendra

                 

                Hi Brajendra,

                 

                can you elaborate? What was the problem? Did you have your desired context in excluded-context list? Because you make it sound the problem is that if you don't configure some excluded context, nothing gets registered? That would be a bug.

                 

                Thanks,

                Rado

                • 5. Re: Mod_cluster configuration with Jboss 7 and Apache/2.2.3
                  Brajendra Singh Newbie

                  Hi Radoslav,

                       We are accessing our application http://server1:8080/index.jsp?locale=en_US&applicationName=admin

                  And we noticed application context i..e. "/" was not registering with with mod_cluster. After adding excluded-contexts="ROOT,admin-console,invoker,jbossws,jmx-console,juddi,web-console" in <subsystem xmlns="urn:jboss:domain:modcluster:1.2"> context "/" got registered successfully with mod_cluster and able to access application through above URL.

                   

                  Also I deployed application with some context like /myapp then in this context registered without providing excluded-contexts in <subsystem xmlns="urn:jboss:domain:modcluster:1.2">. So I am not sure whether its bug or desired behavior. Pls let me know if you need any further information.

                   

                  Thanks,

                  Brajendra

                  • 6. Re: Mod_cluster configuration with Jboss 7 and Apache/2.2.3
                    Huy Vo Newbie

                    Hi  Brajendra Singh !

                    - I have issue about config mod_cluster 1.2.0.final, Jboss 7.1.1, web server apache 2.2.15, when i run on browser :

                    http://localhost/mod_cluster-manager then detect 2 node such as: node1:8009, node2:8009 ( 2 node running on 2 server ). But when run : http://localhost then throw to index page of apache, not out  application expected

                    - I read acticle and I have adding excluded-contexts="ROOT,admin-console,invoker,jbossws,jmx-console,juddi,web-console" in <subsystem xmlns="urn:jboss:domain:modcluster:1.2"> but context "/"  was not registering with mod_cluster.Please help me

                     

                    Thanks

                    • 7. Re: Mod_cluster configuration with Jboss 7 and Apache/2.2.3
                      Jean-Frederic Clere Master

                      excluded-contexts="ROOT,admin-console,invoker,jbossws,jmx-console,juddi,web-console"

                      ROOT means / won't be registered...

                      • 8. Re: Mod_cluster configuration with Jboss 7 and Apache/2.2.3
                        Huy Vo Newbie

                        Hi Jean-Frederic Clere !

                         

                        - Follow you , when I add excluded-contexts="ROOT,admin-console,invoker,jbossws,jmx-console,juddi,web-console" then ROOT means / won`t be registered on mod_cluster ?, but before I not add ROOT in excluded-contexts issue the same. I do`nt know, to describe for me. Please contact my skpyer: huyvodl

                        Thanks

                        • 9. Re: Mod_cluster configuration with Jboss 7 and Apache/2.2.3
                          Radoslav Husar Master

                          Jean-Frederic Clere wrote:

                           

                          excluded-contexts="ROOT,admin-console,invoker,jbossws,jmx-console,juddi,web-console"

                          ROOT means / won't be registered...

                           

                          Unfortunately, it does not work any more, filed an issue and working on a fix https://issues.jboss.org/browse/WFLY-5756.