Reputation: 1
I can't access mod_cluster-manager and I'm getting the following error on my error.log in apache
[Wed Jan 16 17:20:13 2013] [warn] module proxy_module is already loaded, skipping
[Wed Jan 16 17:20:13 2013] [notice] Advertise initialized for process 2410
[Wed Jan 16 17:20:13 2013] [notice] Apache/2.2.17 (Ubuntu) mod_cluster/1.2.0.Final PHP/5.3.5-1ubuntu7.8 with Suhosin-Patch configured -- resuming normal operations
[Wed Jan 16 17:27:22 2013] [error] proxy: CLUSTER: (balancer://mycluster). All workers are in error state
[Wed Jan 16 17:27:23 2013] [warn] proxy: No protocol handler was valid for the URL /favicon.ico. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
I configured jboss Standalone mode to enable mod_cluster. I added the following lines in their respective sections in standalone-ha.xml
<extension module="org.jboss.as.modcluster"/>
<subsystem xmlns="urn:jboss:domain:modcluster:1.0">
<mod-cluster-config advertise-socket="modcluster" advertise-security-key="secret"/>
</subsystem>
I downloaded the following modules : mod_slotmem.so mod_manager.so mod_proxy_cluster.so mod_advertise.so
in http://downloads.jboss.org/mod_cluster//1.1.0.Final/mod_cluster-1.1.0.Final-linux2-x64-so.tar.gz then put it in usr/lib/apache2/modules.
I have set the following in mod_cluster.load in /etc/apache2/mods-available.
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule proxy_ajp_module /usr/lib/apache2/modules/mod_proxy_ajp.so
LoadModule slotmem_module /usr/lib/apache2/modules/mod_slotmem.so
LoadModule manager_module /usr/lib/apache2/modules/mod_manager.so
LoadModule proxy_cluster_module /usr/lib/apache2/modules/mod_proxy_cluster.so
LoadModule advertise_module /usr/lib/apache2/modules/mod_advertise.so
I have set the following in mod_cluster.conf
CreateBalancers 1
<IfModule manager_module>
Listen 127.0.0.1:8082
ManagerBalancerName mycluster
<VirtualHost 127.0.0.1:8082>
KeepAliveTimeout 300
MaxKeepAliveRequests 0
AdvertiseFrequency 5
ServerAdvertise On
<Location />
Order deny,allow
Allow from 127.0.0.1
</Location>
</VirtualHost>
</IfModule>
I enable the module by executing $ sudo a2enmod mod_cluster
And lastly, I have set the following in jboss in /etc/apache2/sites-available
#NameVirtualHost *:80
<VirtualHost *:80>
#ServerAdmin [email protected]
ServerName comitdev2
ServerAlias comitdev2
ProxyPass / balancer://mycluster stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://mycluster
ProxyPreserveHost On
<Location />
Order deny,allow
Allow from All
</Location>
<Location /mod_cluster-manager>
SetHandler mod_cluster-manager
Order deny,allow
#Deny from all
Allow from 127.0.0
</Location>
</VirtualHost>
Lastly, I disabled the 000-default site and enabled the jboss site
Everytime I access the localhost I get Service Temporarily Unavailable.
I'm using Ubuntu 11.04
Upvotes: 0
Views: 1345
Reputation: 424
Hmm, I can see mod_cluster/1.2.0.Final in your log whereas you state you used mod_cluster-1.1.0.Final-linux2-x64-so.tar.gz, how come?
Why do you use CreateBalancers 1 and ProxyPass while you don't do anything special in ProxyPass? The setting seems to be correct though. I would suggest to try to run with CreateBalancers 1 and ProxyPass commented out in order to narrow down the error search space :-)
Anyhow, try this:
mod_cluster.conf
# MOD_CLUSTER_ADDS
<IfModule manager_module>
Listen 127.0.0.1:8082
ManagerBalancerName mycluster
<VirtualHost 127.0.0.1:8082>
<Location />
Order deny,allow
Deny from all
#Just for testing, of course...
Allow from all
</Location>
KeepAliveTimeout 300
MaxKeepAliveRequests 0
AdvertiseFrequency 5
#AdvertiseSecurityKey secret
#This is important, see docs...
EnableMCPMReceive
<Location /mcm>
SetHandler mod_cluster-manager
Order deny,allow
Deny from all
#Just for testing, of course...
Allow from all
</Location>
</VirtualHost>
</IfModule>
http.conf
# This must be disabled for mod_cluster to work properly!
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
# mod_cluster ifself
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
as7
<subsystem xmlns="urn:jboss:domain:modcluster:1.1">
<mod-cluster-config advertise-socket="modcluster" connector="ajp" />
</subsystem>
NOTE: I have urn:jboss:domain:modcluster:1.1, and you should use more recent AS7 as well. Schema 1.0 is quite obsolete.
If this dead-simple setup works for you, then add your ProxyPass back and let's see whether it is the cause of your troubles or not.
HTH
Upvotes: 0