1 Reply Latest reply on Jul 29, 2014 3:57 AM by Chris Ritchie

    modcluster (Wildfly) is not detecting Advertize from Apache

    Chris Ritchie Newbie



      I am trying to configure WildFly 8.1.0 with mod_cluster. Both WildFly and Apache are running on the same machine. The machine is Ubuntu 12.04 with Apache 2.2.x


      Apache is set up correctly (I believe). I have tested that the advertise module is working correctly by running the test class Advertise found in the mod_proxy source code (github). There are no errors in the apache logs.


      I am starting the server as follows: ./standalone.sh -c standalone-ha.xml


      If any one can see something wrong with the configuration below and help put me out of days of misery, I would be really grateful....


      Apache configuration:


      CreateBalancers 1


      <IfModule manager_module>


          Listen *:6666

          ManagerBalancerName mycluster


          <VirtualHost *:6666>

              KeepAliveTimeout 300

              MaxKeepAliveRequests 0

              AdvertiseFrequency 5

              ServerAdvertise On

          AllowDisplay On

              <Location />

                  Order deny,allow

                  Allow from 127.0.1


             <Location /mod_cluster_manager>

                  SetHandler mod_cluster-manager

                  Order deny,allow

                  #Deny from all

                  #Allow from 127.0.1

                  Allow from all






      VirtualHost configuration:


      <VirtualHost *:80>

              ServerAdmin webmaster@localhost

              DocumentRoot /var/www/html


              ProxyPass / balancer://mycluster stickysession=JSESSIONID|jsessionid nofailover=On

              ProxyPassReverse / balancer://mycluster

              ProxyPreserveHost On


              ErrorLog ${APACHE_LOG_DIR}/error.log

              CustomLog ${APACHE_LOG_DIR}/access.log combined




      The results of the Advertize test class:


      received from /

      received: HTTP/1.0 200 OK

      Date: Sat, 26 Jul 2014 20:03:12 GMT

      Sequence: 121

      Digest: 4dedd3761d451227f36534b63ca2a8a1

      Server: b23584e2-314f-404d-8fde-05069bfe5dc7


      X-Manager-Url: /b23584e2-314f-404d-8fde-05069bfe5dc7

      X-Manager-Protocol: http




      The print out from mod_cluster_manager (



      start of "httpd.conf" configuration

      mod_proxy_cluster.c: OK

      mod_sharedmem.c: OK

      Protocol supported: http AJP

      mod_advertise.c: OK


      Server: VirtualHost: *:80

      Server: VirtualHost: *:6666 Advertising on Group Port 23364 for every 5 seconds

      end of "httpd.conf" configuration



      Lastly, here are the relevant bits taken from standalone-ha.xml



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

                  <mod-cluster-config advertise-socket="modcluster" connector="ajp">


                          <load-metric type="cpu"/>





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



              <interface name="management">

                  <inet-address value=""/>


              <interface name="public">

                  <inet-address value=""/>


              <interface name="unsecure">

                  <inet-address value="${jboss.bind.address.unsecure:}"/>




      The only part of the server log that relates to modcluster (output during server startup):


      15:53:29,805 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017519: Undertow HTTP listener default listening on /

      15:53:29,811 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017519: Undertow AJP listener ajp listening on /

      15:53:29,905 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 54) MODCLUSTER000001: Initializing mod_cluster version 1.3.0.Final

      15:53:29,967 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 54) MODCLUSTER000032: Listening to proxy advertisements on /

        • 1. Re: modcluster (Wildfly) is not detecting Advertize from Apache
          Chris Ritchie Newbie

          I managed to figure out the problem here, finally. The public interface also needs to reference the server IP, not


          Mod cluster is forwarding the request to WildFly, so hence it needs the server IP. I figured as it was coming from Apache it would be a localhost call, which is incorrect.


          The updated interface configuration is:



              <interface name="management">

                  <inet-address value="178.62.50.xxx"/>


              <interface name="public">

                  <inet-address value="178.62.50.xxx"/>


              <interface name="unsecure">

                  <inet-address value="${jboss.bind.address.unsecure:}"/>