6 Replies Latest reply on Jun 27, 2014 8:16 AM by Radoslav Husar

    Modcluster finding other Nodes

    Isa B Newbie

      Hi All

       

      I am using Wildfly-8.0.0-Final with modcluster. I had this setup working fine in my INT  environment. Today I started moving to QA and when I started modcluster, it found my int environments contexts which I can confirm by looking at mod_cluster_manager pager. Also my INT environment picked up my QA contexts.  How do I stop this from happening ?

       

      Here is my Modcluster  (1.1.1-2.el6) settings:

       

      #

      # This is mod_cluster module configuration file. Please refer to README

      # for more information on how to enable mod_cluster.

       

      LoadModule proxy_module         modules/mod_proxy.so

      LoadModule slotmem_module       modules/mod_slotmem.so

      LoadModule proxy_ajp_module     modules/mod_proxy_ajp.so

      LoadModule manager_module       modules/mod_manager.so

      LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

      LoadModule advertise_module     modules/mod_advertise.so

       

      CreateBalancers 1

       

      <IfModule manager_module>

         ListenHOSTNAME:9000

        <VirtualHost HOSTNAME:9000>

          #Services

       

          ProxyPass /AccessControl/ balancer://mycluster/AccessControl/ nofailover=On

          ProxyPassReverse /AccessControl/ balancer://mycluster/AccessControl/

       

          ProxyPreserveHost On

       

          <Location /mod_cluster_manager>

             SetHandler mod_cluster-manager

          </Location>

       

          ManagerBalancerName mycluster

              KeepAliveTimeout 300

              MaxKeepAliveRequests 0

              AdvertiseFrequency 5

              ServerAdvertise On

              #EnableMCPMReceive

       

          #Log

              ErrorLog "logs/mod_cluster_error_log"

              CustomLog "logs/mod_cluster_access_log" common

              LogLevel info

      </VirtualHost>

      </IfModule>

       

      Here is my standalone.xml:

      <mod-cluster-config advertise-socket="modcluster" proxy-list="HOSTNAME:9000" proxy-url="/" advertise="true" excluded-contexts="ROOT,invoker,jbossws,juddi,console" auto-enable-contexts="true" stop-context-timeout="10" socket-timeout="20" sticky-session="false" sticky-session-remove="false" sticky-session-force="false" worker-timeout="-1" max-attempts="1" flush-packets="false" flush-wait="-1" ping="10" smax="-1" ttl="-1" node-timeout="-1" connector="ajp"/>
        • 1. Re: Modcluster finding other Nodes
          Radoslav Husar Master

          So the problem ist that the QE deployemnts registered with the production environment? You need to separate them cleanly.

           

          There are lot of ways to do this:

          • use security advertize key
          • use different  multicast group (AdvertiseGroup)
          • use allow from/deny from to filter for correct IP address ranges
          • disable server advertise (ServerAdvertise off) and configure proxy-list (in WildFly configuration)

           

          Honestly, the first 3 should have been already done as a security precaution.

          • 2. Re: Modcluster finding other Nodes
            Isa B Newbie

            No the Problem was between QA and INT  not Production. The next step would be production

             

            what worked for me is

            disable server advertise (ServerAdvertise off) and configure proxy-list (in WildFly configuration)

            I will have a look at the others.

            use different  multicast group (AdvertiseGroup)

            Is this the multicast address under socket binding?

             

                <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
            • 3. Re: Modcluster finding other Nodes
              Radoslav Husar Master

              Is this the multicast address under socket binding?

               

              <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>

              Yes, but note that both parts needs to use the same multicast group and address. See the docs mod_cluster Documentation

               

              So to efficiently split them, both test AS and test Apache couple need the same address and then prod AS and prod Apache needs to use same but different from the first couple.

              • 4. Re: Modcluster finding other Nodes
                Isa B Newbie

                both test AS and test Apache couple need the same address

                 

                Last question, so how do I add this this address to apache?

                 

                Thanks for the help so far, you always very helpful

                • 5. Re: Modcluster finding other Nodes
                  Isa B Newbie

                  Hi

                   

                  use security advertize key

                   

                  I have implemented the above but it does not seem to work. I have set a key in WF and a different key in httpd but the nodes still register on mod_cluster.  The reason I am trying this is because

                  disable server advertise (ServerAdvertise off) and configure proxy-list (in WildFly configuration)

                  actually did not work for me

                  • 6. Re: Modcluster finding other Nodes
                    Radoslav Husar Master

                    Hm, strage it doesn't work, there is also test in the testsuite that validates this logic. What versions are you using?

                     

                    If you dont configure one in the wildfly subsystem, it will not be validated (this has changed in 1.3.x mocluster and wildfly 8 iirc).

                     

                    Take a look at the above comment (Re: Modcluster finding other Nodes) and implement a different way.