2 Replies Latest reply on Jul 11, 2014 2:25 AM by Alexis Hassler

    mod_cluster cannot find the node

    Alexis Hassler Apprentice

      Hi all,


      I'm using httpd 2.2.26 with WildFly 8.1 on the same MacOS X machine. I can bind my WildFly instance to the httpd with the :add-proxy CLI operation, but httpd+mod_cluster is not able to discover the instance.


      The WildFly instance is started on standalone mode, with the default standalone-ha.xml configuration. The modcluster subsystem configuration is :


        <subsystem xmlns="urn:jboss:domain:modcluster:1.2">
          <mod-cluster-config advertise-socket="modcluster" connector="ajp">
              <load-metric type="cpu"/>

      With the advertise socket binding :


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

      On the httpd side, the mod_cluster is configuration is :


        <Location />
          Order deny,allow
          Deny from all
          Allow from 192.168.1
        KeepAliveTimeout 60
        MaxKeepAliveRequests 0
        ManagerBalancerName mycluster
        ServerAdvertise On
        AdvertiseFrequency 5  

      As suggested in the FAQ, I tried the Advertize test class which seems to work fine. Here is the answer :


      received from /
      received: HTTP/1.0 200 OK
      Date: Thu, 10 Jul 2014 22:23:58 GMT
      Sequence: 5
      Digest: f8965681c8e3665333ac5c4a836452ce
      Server: c95fbde6-91d6-4405-837d-b381933accc8
      X-Manager-Url: /c95fbde6-91d6-4405-837d-b381933accc8
      X-Manager-Protocol: http
      X-Manager-Host: mbpi7ha

      I also added "AllowDisplay On" in the httpd config, and now, the cluster-manager shows the followinf data :


      start of "httpd.conf" configuration
      mod_proxy_cluster.c: OK
      mod_sharedmem.c: OK
      Protocol supported: http AJP https
      mod_advertise.c: OK
      Server: mbpi7ha VirtualHost: Advertising on Group Port 23364 for every 5 seconds
      end of "httpd.conf" configuration

      And, of course, I don't see any error log, neither in httpd's error_log, nor in wildfly's server.log.


      What can be wrong in my config ? What could look at ?



        • 1. Re: mod_cluster cannot find the node
          Roman Jurkov Newbie



          since it is on the same machine, you can't bind to the same socket, and that is probably because reuse of address is not set (SO_REUSEADDR). I don't know how to do that in jboss/java, however i looked briefly at mod_advertise, and i see that SO_REUSEADDR is set, so theoretically if you would start jboss first, let it bind to that socket, then start http, that should do the trick.



          • 2. Re: Re: mod_cluster cannot find the node
            Alexis Hassler Apprentice

            Thanks for your help, Roman.


            I think that the Advertize test class is the proof that httpd / mod_cluster and a Java instance can share the same multicast socket.


            My problem was simplier and really dumb. I had to specify an IP binding to WildFly, for example :


            bin/standalone.sh -b -c standalone-ha.xml

            Now mod_cluster and WildFly can discover each other.