8 Replies Latest reply on Apr 8, 2019 5:20 AM by rhusar

    Problem  with mod_cluster and eap 7.2

    nh.2013

      Hello:

      I'm having problems with the mod_cluster configuration in jboss eap 7.2.

      First I need to say that the information in this link is wrong:

      https://access.redhat.com/solutions/2332111

       

      Another thing is that the configuration of jboss eap 6.4.11 for the domain.xml does not work in eap 7.2. 

      I needed to change it to:

       

      <proxy name="default" advertise-socket="modcluster" listener="ajp" proxy-list="IP:6666" proxy-url="/mod_cluster">

      <dynamic-load-provider>

                              <load-metric type="cpu"/>

      </dynamic-load-provider>

      </proxy>

       

      ----

      In EAP 6.4 I had a working setup like:

       

      <mod-cluster-config advertise-socket="modcluster" proxy-list="IP:6666" proxy-url="/mod_cluster" advertise="true" connector="ajp">

      <dynamic-load-provider>

      <load-metric type="busyness"/>

                          </dynamic-load-provider>

      </mod-cluster-config>

       

      ----

      I have tried even setting the mod_cluster using the EAP 7.2 console but no avail.

       

      Looking at the path of the modules I can only see the module.xml /app/jboss-eap-desktop/modules/system/layers/base/org/jboss/as/modcluster/main/

       

      Where at the 6.4 installation I had a custom module.xml with all the dependencies and the following jars:

       

      jboss-as-modcluster-7.5.0.Final-redhat-21.jar

      mod_cluster-container-catalina-1.2.11.Final-redhat-1.jar

      mod_cluster-container-jbossweb-1.2.11.Final-redhat-1.jar

      mod_cluster-container-spi-1.2.11.Final-redhat-1.jar

      mod_cluster-core-1.2.11.Final-redhat-1.jar

       

      I have tried to upload these jars to the new installation but are not compatable. I have also tried to download the 1.3.1 binaries from http://modcluster.io but it seems that putting them int the modules directory does not work either

       

      Anyone can help me? I don't know if I need binaries to install there or what is happen?

      The Apache is the same (with all mod_cluster libs), that registers the nodes in EAP 6.4

       

      The apache mod_cluster.conf has the IP in the allowed IPs. I see the mod_cluster page but I cannot see the jboss node.

       

      Thanks in advance

        • 1. Re: Problem  with mod_cluster and eap 7.2
          nh.2013

          I'm having the same problem in EAP 7 and 7.2. Apache's mod_cluster does not register my jboss. The operating system is Red Hat Linux 7.6

           

          Thanks in advance

          • 2. Re: Problem  with mod_cluster and eap 7.2
            nh.2013

            Please, can anybody help me? There are no error traces and nothing. I don't understand why Apache does not see my jboss node.

             

            Thanks

            • 3. Re: Problem  with mod_cluster and eap 7.2
              rhusar

              FYI you post was marked as spam, thus it wasn't showing to anybody yet – approved it now.

              • 4. Re: Problem  with mod_cluster and eap 7.2
                rhusar

                Another thing is that the configuration of jboss eap 6.4.11 for the domain.xml does not work in eap 7.2.

                Can you post what's the actual problem with the configuration? If you just boot the new domain with the old xml it will upgrade automatically to new schema versions – any chance you did that?. No need to change anything manually.

                 

                <mod-cluster-config advertise-socket="modcluster" proxy-list="IP:6666" proxy-url="/mod_cluster" advertise="true" connector="ajp">

                You are using multicast discovery mechanism in conjunction with hard-coded proxy list – which one are you actually using?

                 

                Also, proxy-list is deprecated, use attribute 'proxies' which references outbound-socket-bindings, e.g.

                 

                 

                /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=proxy1:add(host=127.0.0.1,port=9090

                /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=proxy2:add(host=127.0.0.1,port=9190

                /subsystem=modcluster/proxy=default:write-attribute(name=proxies, value=[proxy1, proxy2]

                reload

                 

                 

                <proxy name="default" advertise-socket="modcluster" listener="ajp" proxy-list="IP:6666" proxy-url="/mod_cluster">

                The subsystem now supports defining multiple configurations to register with multiple proxies or multiple hosts, thus the change.

                 

                I have tried even setting the mod_cluster using the EAP 7.2 console but no avail.

                Can you post the error?

                 

                Where at the 6.4 installation I had a custom module.xml with all the dependencies and the following jars:

                 

                jboss-as-modcluster-7.5.0.Final-redhat-21.jar

                mod_cluster-container-catalina-1.2.11.Final-redhat-1.jar

                mod_cluster-container-jbossweb-1.2.11.Final-redhat-1.jar

                mod_cluster-container-spi-1.2.11.Final-redhat-1.jar

                mod_cluster-core-1.2.11.Final-redhat-1.jar

                What do you need custom module.xml for?

                Anyone can help me? I don't know if I need binaries to install there or what is happen?

                The Apache is the same (with all mod_cluster libs), that registers the nodes in EAP 6.4

                You do not need to upgrade your native binaries. The versions are compatible.

                • 5. Re: Problem  with mod_cluster and eap 7.2
                  nh.2013

                  Thanks a lot for the answer. I have fixed now the issue. The problem was that I had a bad configuration for the server groups.

                   

                  Now I'm seeing all instances at mod_cluster. I have 3 apache web servers with the mod_cluster modules and 3 jboss instances. I have server advertise explicity disabled but mod_cluster is discovering all the servers:

                   

                  This is my configuration:

                   

                  Jboss side:

                   

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

                                  <proxy name="proxy1" advertise="false" advertise-socket="modcluster" listener="ajp" proxies="proxy1" proxy-url="/mod_cluster">

                                      <dynamic-load-provider>

                                          <load-metric type="busyness"/>

                                      </dynamic-load-provider>

                                  </proxy>

                              </subsystem>

                   

                  mod_cluster.conf:

                   

                  # mod_proxy_balancer should be disabled when mod_cluster is used

                  LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

                  LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so

                  LoadModule manager_module modules/mod_manager.so

                  LoadModule advertise_module modules/mod_advertise.so

                   

                   

                  <IfModule manager_module>

                   

                   

                      Listen IP:16666

                      ManagerBalancerName nhdesktop

                      CreateBalancers 0

                      PersistSlots On

                   

                   

                      <VirtualHost 172.19.54.11:16666> # change IP address to suit your environment

                        #  KeepAliveTimeout 300

                        #  MaxKeepAliveRequests 0

                           CheckNonce Off

                           ServerAdvertise Off

                           #AdvertiseFrequency 5

                           EnableMCPMReceive On

                           KeepAliveTimeout 60

                           MaxKeepAliveRequests 0

                           AdvertiseGroup 224.0.1.105:23365

                        #  AdvertiseSecurityKey secret # change key to match jboss config below

                   

                   

                          <Location /mod_cluster_manager>

                                  SetHandler mod_cluster-manager

                                  Require ip list_of_ips

                          </Location>

                   

                  Thanks a lot for the help

                  • 6. Re: Problem  with mod_cluster and eap 7.2
                    rhusar

                    Remember that this is a discovery mechanism, once a node is discovered, just because you disabled advertising where the server is, since its already discovered the WildFly instances are already aware of it. You can just restart the wildfly servers or use a management operation to remove those discovered proxies.

                     

                    Rado

                    1 of 1 people found this helpful
                    • 7. Re: Problem  with mod_cluster and eap 7.2
                      nh.2013

                      Thanks a lot for the answer.

                       

                      I have managed to fix the problem. Restarting the servers made not effect, but cleaning tmp and data directories worked and now mod_cluster is registering the instances properly. Seems like a bug

                       

                      Thanks.

                      • 8. Re: Problem  with mod_cluster and eap 7.2
                        rhusar

                        Just to confirm, did you restart the load balancers or the backend workers?