JBoss.orgCommunity Documentation

Chapter 17. Frequently Asked questions

17.1. What is Advertise
17.2. What to do if I don't want to use Advertise (multicast):
17.3. I am using Tomcat 7 / 6 what should I do:
17.4. It is not working what should I do:
17.4.1. No error
17.4.2. Error in server.log or catalina.out
17.4.3. Error in error_log

Advertise allows autodiscovery of httpd proxies by the cluster nodes. It is done by sending multicast messages from httpd to the cluster. The httpd specialized module: mod_advertise sends UDP message on a multicast group, both mod_advertise and the cluster listener joined the multicast group and the cluster receives the messages.

Example for mod_advertise message:

HTTP/1.0 200 OK
Date: Wed, 08 Apr 2009 12:26:32 GMT
Sequence: 16
Digest: f2d5f806a53effa6c67973d2ddcdd233
Server: 1b60092e-76f3-49fd-9f99-a51c69c89e2d
X-Manager-Url: /bla
X-Manager-Protocol: http

The X-Manager-Address header value is used by the cluster logic to send information about the cluster to the proxy. It is the IP and port of the VirtualHost where mod_advertise is configured or URL parameter of the ServerAdvertise directive.

See Proxy Discovery in Configuration Properties and mod_advertise in Apache httpd configuration.

In the VirtualHost receiving the MCPM of httpd.conf don't use any Advertise directive or use:

ServerAdvertise Off

In mod_cluster-jboss-beans.xml add the addresses and ports of the VirtualHost to the proxyList property and set advertise to false, for example:

<property name="proxyList">,</property>
<property name="advertise">false</property>

In server.xml (with JBossweb/Tomcat)

<Listener className="org.jboss.modcluster.catalina.ModClusterListener" advertise="true"/>

See at the end of java configuration. You can't use the mod_cluster clustered mode with Tomcat so you get a loadbalancing logic similar to mod_jk but with a dynamic configuration.

Most likely you have a configuration problem. Check the log of the cluster nodes and error_log of httpd.

That happens when Advertise is not working: The nodes don't get the advertise messages from httpd.

  1. Check the modules are loaded and Advertise is started. In httpd.conf activate extended information display, add:

    AllowDisplay On

    When accessing to the mod_cluster_manager you should get something like:

    If not, go to the Minimal Example and add the missing directive(s).

  2. Check that Advertise message are received on the cluster node. A small Java utility could be used to check Advertise. It is in the mod_cluster repository and can be compiled using javac. A compiled version can be found under in /opt/jboss/httpd/tools in the bundles. Run it using java Advertise multicastaddress port. The output should be something like:

    [jfclere@jfcpc java]$ java Advertize 23364
    ready waiting...
    received: HTTP/1.0 200 OK
    Date: Mon, 28 Jun 2010 07:30:31 GMT
    Sequence: 1
    Digest: df8a4321fa99e5098174634f2fe2f87c
    Server: 1403c3be-837a-4e76-85b1-9dfe5ddb4378
    X-Manager-Address: test.example.com:6666
    X-Manager-Url: /1403c3be-837a-4e76-85b1-9dfe5ddb4378
    X-Manager-Protocol: http
    X-Manager-Host: test.example.com
  3. No Advertise messages

    Check firewall (don't forget the boxes firewall). Advertise uses UDP port 23364 and multicast addresse

  4. Can't get Advertise messages

    Use ProxyList property. In case Advertise can't work you put the address and port of the VirtualHost used in httpd to receive the MCMP. In server/profile/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml

    <property name="proxyList">test.example.com:6666</property>

    or in server.xml:

    <Listener className="org.jboss.modcluster.catalina.ModClusterListener" proxyList="test.example.com:6666"/>