mod-cluster: JBoss-EWS versus Redhat httpd
willemnoorduin Aug 10, 2012 7:24 AMI have the following architecture configured:
- A JBoss-AS 7.1.1 cluster, based on standalone-ha.xml profile configuration on a Redhat server
I access the application server via the following Vitrtual Host:
LoadModule slotmem_module modules/mod_slotmem.so
LoadModule manager_module modules/mod_manager.so
LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
LoadModule advertise_module modules/mod_advertise.so
...
# Use name-based virtual hosting.
#
NameVirtualHost 192.168.0.1:80
...
ServerAdvertise On
AdvertiseGroup 224.0.1.204:30000
<VirtualHost 192.168.0.1:80>
ServerName www.test.nl:80
ServerAdmin unix@tntpost.nl
DocumentRoot /var/www/www.test.nlt/data
ErrorLog logs/www.test.nl-error_log
CustomLog logs/www.test.nl-access_log combined
LogLevel debug
EnableMCPMReceive
ManagerBalancerName eap6
<Directory />
Order deny,allow
Deny from all
Allow from all
</Directory>
KeepAliveTimeout 60
MaxKeepAliveRequests 0
Createbalancers 1
<Location /mcm>
SetHandler mod_cluster-manager
Order deny,allow
Deny from all
Allow from 192.168
</Location>
<Location /appl >
ProxyPass balancer://eap6/appl stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse balancer://eap6/appl
</Location>
</VirtualHost>
and this works like a charm, so no issues there. JBoss-EWS is a "apache/tomcat5/tomcat6" unzip it and run product from Redhat. So I thought, the same ought to work in your regular httpd. So I did the following:
- yum install httpd
- Copy the mod_cluster modules from Redhat to /etc/httpd/modules (that is mod_cluster/1.2.1.Final)
- Solve the SELinux warning and errors that were there during an initial restart (SELinux is set to permissive for the time being).
When I start httpd with the above virtual host configuration: http://www.test.nl/mcm gives my cluster, but what I try in the PoxyPass / ProxyReverse definition (slashes after the appl, no slashes, mixed slashes), I always get a
[Fri Aug 10 13:14:17 2012] [warn] proxy: No protocol handler was valid for the URL /appl. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
and a Internal Server error.
When I go to http://www.test.nl:8080/appl, it also works, but because al this is on the same Redhat Server (JBoss-AS and Apache), I guess this bypasses mod_cluster alltogether, and is directly knocking onto the JBoss-AS instance. Any thoughts on this ?