JBoss.orgCommunity Documentation
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-Address: 127.0.0.1:6666 X-Manager-Url: /bla X-Manager-Protocol: http X-Manager-Host: 10.33.144.3
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
<property name="proxyList">10.33.144.3:6666,10.33.144.1:6666</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.
That happens when Advertise is not working: The nodes don't get the advertise messages from httpd.
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).
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 224.0.1.105 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
No Advertise messages
Check firewall (don't forget the boxes firewall). Advertise uses UDP port 23364 and multicast addresse 224.0.1.105
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"/>
18:36:14,533 INFO [DefaultMCMPHandler] IO error sending command INFO to proxy jfcpc/10.33.144.3:8888
You can use telnet hostname/address port to check by hands that it is OK for example:
[jfclere@jfcpc docs]$ telnet 10.33.144.3 8888 Trying 10.33.144.3... Connected to jfcpc. Escape character is '^]'. GET / <html><body><h1>It works!</h1></body></html>Connection closed by foreign host.
ServerAdvertise On http://localhost:6666
If you don't get a similar page the output should help to find that is wrong.
"client denied by server configuration":
The directory in the VirtualHost is not allowed for the client. If you have something like:
Mon Jun 28 18:08:47 2010] [error] [client 10.33.144.3] client denied by server configuration: /
You need to have something like:
<Directory /> Order deny,allow Deny from all Allow from 10.33.144.3 </Directory>