简体   繁体   English

使用mod_cluster进行WildFly 9负载平衡

[英]WildFly 9 load balancing with mod_cluster

I'm trying to configure load balancing with jboss wildfly running on windows for the first time. 我正在尝试使用Windows上首次运行的jboss wildfly配置负载平衡。 I d'ont have an experience with jboss or apache httpd. 我没有jboss或Apache httpd的经验。 i have installed apache httpd and mod_cluster, than i added the required modules from mod_cluster to appache httpd then in httpd.conf i added this configuration : 我已经安装了apache httpd和mod_cluster,比我从mod_cluster向appache httpd添加了所需的模块,然后在httpd.conf中我添加了以下配置:

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
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
Listen 127.0.0.1:8080

<VirtualHost 127.0.0.1:8080>
<Location /mod_cluster_manager>
      SetHandler mod_cluster-manager
 Order deny,allow
 Deny from all
 Allow from 127.0.0.
</Location>
 KeepAliveTimeout 60
 MaxKeepAliveRequests 0
 ManagerBalancerName mycluster
 ServerAdvertise On
</VirtualHost>

When i put a clustered ejb application in the deployments and start the server with default standlone-ha.xml values i can access to /mod_cluster_manager but there is no node detected I don't know if theres is further configuration i found a tutorial but it's not well explained anything can help thank you 当我在部署中放置群集的ejb应用程序并使用默认standlone-ha.xml值启动服务器时,我可以访问/ mod_cluster_manager,但是没有检测到节点,我不知道是否还有进一步的配置,我找到了一个教程,但是它是没有很好的解释什么可以帮助谢谢

You are missing some configuration, so there is no communication between Apache and Wildfly currently. 您缺少一些配置,因此Apache和Wildfly之间目前没有通信。

First, change the Port of your virtual host above to 6666 (common default for mod_cluster-manager virtual host) or anything other than 8080. You seem to be running Wildfly and Apache on the same host, 8080 is Wildfly's default HTTP listener Port, so instead of changing Wildfly's default, use something else for Apache. 首先,将虚拟主机的端口更改为6666(mod_cluster-manager虚拟主机的默认默认端口)或8080以外的任何其他端口。您似乎在同一主机上运行Wildfly和Apache,8080是Wildfly的默认HTTP侦听器端口,因此而不是更改Wildfly的默认设置,而是对Apache使用其他设置。

Then you have two options: 然后,您有两个选择:

a) enable MCPM in Apache's part of mod_cluster to get multicast auto-configuration a)在mod_cluster的Apache部分启用MCPM以获取多播自动配置

<VirtualHost 127.0.0.1:6666>
  ...
  EnableMCPMReceive
</VirtualHost>

b) don't use multicast, and explicitly set the proxies in Wildfly's standalone.xml b)不要使用多播,并在Wildfly的standalone.xml中显式设置代理

<subsystem xmlns="urn:jboss:domain:modcluster:2.0">
   <mod-cluster-config proxies="127.0.0.1:6666" ...>
   ...
   </mod-cluster-config>
</subsystem>

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

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