I followed by your suggestion and set up apache and jboss instances as follows :
<VirtualHost *:8000>
<Directory />
Order deny,allow
Allow from all
</Directory>
<Location /mod_cluster_manager>
AllowDisplay On
SetHandler mod_cluster-manager
Order deny,allow
Allow from all
</Location>
KeepAliveTimeout 60
MaxKeepAliveRequests 0
ManagerBalancerName test
AdvertiseFrequency 5
AdvertiseGroup 224.0.1.106:23364
</VirtualHost>
I've set up mod_cluster-jboss-beans.xml for each node as follows :
<!-- URL prefix to send with commands to mod_cluster. Default is no prefix. -->
<!--property name="proxyURL"></property-->
<!-- mod_advertise is a small httpd module that advertises the
availability of httpd servers via multicast, allowing
ModClusterService to discover the httpd front-end instead of/in
addition to having them defined in proxyList. -->
<!-- Whether to listen for advertise messages -->
<property name="advertise">true</property>
<!-- Multicast address on which to listen for advertisements -->
<property name="advertiseGroupAddress">224.0.1.106</property>
<!-- Port on which to listen for advertisements -->
<property name="advertisePort">23364</property>
<!-- Network interface address on which to listen for advertisements -->
<property name="advertiseInterface">192.168.1.206</property>
Then my httpd:8000/mod_cluster_manager doesn't show any cluster nodes connected, but i see in JBosses console that nodes see each other (f.x. node1 shows that node2 has been closed when i kill the node2 process)
Error i got on both AS instances :
14:47:27,108 INFO [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] IO error
sending command INFO to proxy www.mydomain.com/87.248.217.254:8000: java.net.Con
nectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method) [:1.6.0_22]
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) [:1.6.0_
22]
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) [
:1.6.0_22]
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) [:1.6.0_22
]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) [:1.6.0_22
]
at java.net.Socket.connect(Socket.java:529) [:1.6.0_22]
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy.getConnection
(DefaultMCMPHandler.java:883)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy.getConnection
Writer(DefaultMCMPHandler.java:909)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(Default
MCMPHandler.java:532)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(Default
MCMPHandler.java:646)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPH
andler.java:399)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPH
andler.java:377)
at org.jboss.modcluster.ha.HAModClusterService$ClusteredModClusterServic
e.updateClusterStatus(HAModClusterService.java:1186)
at org.jboss.modcluster.ha.HAModClusterService$ClusteredModClusterServic
e.status(HAModClusterService.java:1167)
at org.jboss.modcluster.ha.HAModClusterService.status(HAModClusterServic
e.java:359)
at org.jboss.modcluster.catalina.CatalinaEventHandlerAdapter.handleNotif
ication(CatalinaEventHandlerAdapter.java:427)
at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source) [:1.6.0
_22]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25) [:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]
at org.jboss.mx.notification.NotificationListenerProxy.invoke(Notificati
onListenerProxy.java:154)
at $Proxy156.handleNotification(Unknown Source) at org.jboss.mx.util.JBo
ssNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcaster
Support.java:127)
at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotificatio
n(JBossNotificationBroadcasterSupport.java:108)
at org.jboss.web.tomcat.service.deployers.TomcatService.startConnectors(
TomcatService.java:641)
at org.jboss.web.tomcat.service.deployers.TomcatService.handleNotificati
on(TomcatService.java:679)
at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source) [:1.6.0
_22]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25) [:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]
at org.jboss.mx.notification.NotificationListenerProxy.invoke(Notificati
onListenerProxy.java:154)
at $Proxy155.handleNotification(Unknown Source) at javax.management.Noti
ficationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.jav
a:257) [:1.6.0_22]
at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(Noti
ficationBroadcasterSupport.java:322) [:1.6.0_22]
at javax.management.NotificationBroadcasterSupport$1.execute(Notificatio
nBroadcasterSupport.java:307) [:1.6.0_22]
at javax.management.NotificationBroadcasterSupport.sendNotification(Noti
ficationBroadcasterSupport.java:229) [:1.6.0_22]
at org.jboss.bootstrap.impl.base.server.AbstractServer.sendNotificationW
ithCurrentTimeUserData(AbstractServer.java:791) [jboss-bootstrap-impl-base.jar:2
.1.0-alpha-5]
at org.jboss.bootstrap.impl.base.server.AbstractServer.sendStartJmxNotif
ication(AbstractServer.java:768) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.r
un(AbstractServer.java:420) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]
How to handle with it ?
To make it more clear i will write more about my configuration. I run two JBossAS 6.0 instances and Apache 2.2.18 run on same Win2k3 x64 machine with three different IP addresses on same network interface :
- 192.168.1.205/24 - JBossAP node1
- 192.168.1.206/24 - Apache
- 192.168.1.207/24 - JBossAP node2
I run both JBoss instances from command line using :
Node1 :
path_to_jboss\bin\run.bat -c node1 -g test -b 192.168.1.205 -Djboss.Domain=test -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-default -Djboss.jvmRoute=node1
Node2 :
path_to_jboss\bin\run.bat -c node2 -g test -b 192.168.1.207 -Djboss.Domain=test -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-default -Djboss.jvmRoute=node2