简体   繁体   English

mod_cluster与apache和tomcat7集成的问题

[英]issues of mod_cluster & apache & tomcat7 integration

I downloaded mod_cluster native bundles with httpd from http://mod-cluster.jboss.org/mod_cluster/downloads/1-2-6-Final-bin like below. 我从http://mod-cluster.jboss.org/mod_cluster/downloads/1-2-6-Final-bin中下载了带有httpd的mod_cluster本机捆绑,如下所示。 So I did not need to do any configuration for httpd since this tar file contain httpd and related mod_cluster modules. 因此,由于该tar文件包含httpd和相关的mod_cluster模块,因此无需对httpd进行任何配置。

mod_cluster-1.2.6.Final-linux2-x64.tar.gz

Then I downloaded tomcat7 and do the following two things. 然后,我下载了tomcat7并执行以下两项操作。

1 . 1。 add <Listener className="org.jboss.modcluster.container.catalina.standalone.ModClusterListener" proxyList="192.168.91.128:80" advertise="true"/> to tomcat7/conf/server.xml <Listener className="org.jboss.modcluster.container.catalina.standalone.ModClusterListener" proxyList="192.168.91.128:80" advertise="true"/>到tomcat7 / conf / server.xml

2.download mod_cluster-parent-1.2.6.Final-bin.tar.gz from jboss site and extract the jars to tomcat7/lib directory. 2.从jboss站点下载mod_cluster-parent-1.2.6.Final-bin.tar.gz并将jar提取到tomcat7 / lib目录。

I referred all above steps from http://docs.jboss.org/mod_cluster/1.2.0/html/Quick_Start_Guide.html#d0e250 . 我从http://docs.jboss.org/mod_cluster/1.2.0/html/Quick_Start_Guide.html#d0e250引用了上述所有步骤。

But after I started up httpd, tomcat7, I found there are error messages in catalina.out generated again and again like below. 但是在启动httpd tomcat7之后,我发现catalina.out中出现了如下所示的错误消息。 ERROR: MODCLUSTER000042: Error null sending INFO command to 192.168.91.128/192.168.91.128:80, configuration will be reset: nul 错误:MODCLUSTER000042:将INFO命令发送到192.168.91.128/192.168.91.128:80时错误为null,配置将被重置:nul

I pasted the critical configuration from httpd.conf. 我从httpd.conf粘贴了关键配置。

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
<IfModule manager_module>
  Listen 192.168.91.128:6666
  ManagerBalancerName mycluster
  <VirtualHost 192.168.91.128:6666>
    <Location />
     Order deny,allow
     Deny from all
     Allow from 192.168.91
    </Location>

    KeepAliveTimeout 300
    MaxKeepAliveRequests 0
    AdvertiseFrequency 5
    #AdvertiseSecurityKey secret
    #AdvertiseGroup @ADVIP@:23364
    EnableMCPMReceive

    <Location /mod_cluster_manager>
       SetHandler mod_cluster-manager
       Order deny,allow
       Deny from all
       Allow from 192.168.91
    </Location>

  </VirtualHost>
</IfModule>
ServerName localhost

Error 错误

Communication between Apache HTTP Server and Tomcat is bidirectional, ie Tomcat's mod_cluster library needs to talk to a VirtualHost configured in your Apache HTTP Server -- the exactly one VirtualHost where you have EnableMCPMReceive set. Apache HTTP Server和Tomcat之间的通信是双向的,即Tomcat的mod_cluster库需要与在Apache HTTP Server中配置的VirtualHost进行通信-正是其中设置了EnableMCPMReceive VirtualHost。 In this case, please, follow Federico's advice and change the proxyList to match your EnableMCPMReceive VirtualHost IP and port. 在这种情况下,请遵循Federico的建议并更改proxyList以匹配您的EnableMCPMReceive VirtualHost IP和端口。

Advertising 广告

Furthermore, is it intentional that you use both advertising (Apache HTTP Server using UDP multicast to advertise its presence to Tomcats) and you have proxyList set at the same time? 此外,是否有意同时使用广告(使用UDP多播的Apache HTTP Server将其广告发布给Tomcat) 同时设置proxyList的意图? You can get about without one or the other, depending on your desired setup and environment. 您可以一无所获,这取决于您所需的设置和环境。

Do not use mod_cluster 1.2.6, please 请不要使用mod_cluster 1.2.6

mod_clister 1.2.6 is desperately obsolete; mod_clister 1.2.6已过时; it contains not only severe performance issue but also CVE and several noteworthy bugs. 它不仅包含严重的性能问题,而且还包含CVE和一些值得注意的错误。 Please, upgrade to mod_cluster 1.3.1. 请升级到mod_cluster 1.3.1。

See http://modcluster.io for 1.3.1.Final release bits or alternatively http://mod-cluster.jboss.org . 请参阅http://modcluster.io中的1.3.1。最终发行版或http://mod-cluster.jboss.org

Regarding Apache HTTP Server 2.2.x vs 2.4.x 关于Apache HTTP Server 2.2.x和2.4.x

The aforementioned mod_cluster 1.3.1.Final is offered with httpd 2.4.x. httpd 2.4.x提供了上述的mod_cluster 1.3.1.Final。 Do you have any special desire for older httpd 2.2.x? 您对较旧的httpd 2.2.x有什么特别的需求吗? It is possible to compile mod_cluster 1.3.1 with httpd 2.2.x, it's just not what we do regularly as noted in my comment on the subject . 可以使用httpd 2.2.x编译mod_cluster 1.3.1,但这并不是我们在该主题的评论中经常提到

Happy mod_clustering! 祝大家开心! K. K.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM