[英]clError in apache mod_cluster
I can't access mod_cluster-manager and I'm getting the following error on my error.log in apache 我无法访问mod_cluster-manager,并且在apache中的error.log上遇到以下错误
[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. 我将jboss Standalone模式配置为启用mod_cluster。 I added the following lines in their respective sections in standalone-ha.xml
我在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 我下载了以下模块: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. 在http://downloads.jboss.org/mod_cluster//1.1.0.Final/mod_cluster-1.1.0.Final-linux2-x64-so.tar.gz中,然后将其放在usr / lib / apache2 / modules中。
I have set the following in mod_cluster.load in /etc/apache2/mods-available. 我在/ etc / apache2 / mods-available的mod_cluster.load中设置了以下内容。
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 我在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 我通过执行$ sudo a2enmod mod_cluster启用模块
And lastly, I have set the following in jboss in /etc/apache2/sites-available 最后,我在/ etc / apache2 / sites-available中的jboss中设置了以下内容
#NameVirtualHost *:80
<VirtualHost *:80>
#ServerAdmin info@domain.de
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 最后,我禁用了默认值000的站点并启用了jboss站点
Everytime I access the localhost I get Service Temporarily Unavailable. 每次访问本地主机时,都会得到“服务暂时不可用”。
I'm using Ubuntu 11.04 我正在使用Ubuntu 11.04
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? 嗯,我可以在您的日志中看到mod_cluster / 1.2.0.Final,而您声明使用了mod_cluster-1.1.0.Final-linux2-x64-so.tar.gz,怎么来的?
Why do you use CreateBalancers 1 and ProxyPass while you don't do anything special in ProxyPass? 为什么在ProxyPass中没有做任何特殊的事情时为什么要使用CreateBalancers 1和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 :-)
我建议尝试使用CreateBalancers 1和ProxyPass注释掉,以缩小错误搜索空间:-)
Anyhow, try this: 无论如何,请尝试以下操作:
mod_cluster.conf 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 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 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. 注意:我有urn:jboss:domain:modcluster:1.1 ,并且您也应该使用更新的AS7。 Schema 1.0 is quite obsolete.
模式1.0已过时。
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. 如果此简单的设置适用于您,请重新添加ProxyPass,然后看看是否是造成麻烦的原因。
HTH 高温超导
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.