1

I am trying to setup a load balancer using Httpd, mod_cluster and Tomcat. My Httpd is running on the same server with IP 192.168.9.73 where the tomcat is running. Here is my Httpd configuration-

Listen *:9999

<VirtualHost *:9999>

 ManagerBalancerName cluster

 <Directory />
  Order deny,allow
  Deny from none
  Allow from all
 </Directory>

 ProxyPass / balancer://cluster/ stickysession=JSESSIONID|jsessionid nofailover=On
 ProxyPassReverse / balancer://cluster/

 KeepAliveTimeout 300
 MaxKeepAliveRequests 0
 ServerAdvertise On
 AdvertiseGroup 224.0.1.105:23364
 AdvertiseFrequency 5
 <Location /mod_cluster_paas>
  SetHandler mod_cluster-manager
  Order deny,allow
  Deny from none
  Allow from all
 </Location>

</VirtualHost>

and Tomcat server.xml-

<Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1">
    <Listener className="org.jboss.modcluster.container.catalina.standalone.ModClusterListener" advertise="true" proxyList="192.168.9.73:9999"/>

    <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="6">

          <Manager className="org.apache.catalina.ha.session.BackupManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true" mapSendOptions="6"/>

         <Channel className="org.apache.catalina.tribes.group.GroupChannel">

         <Membership className="org.apache.catalina.tribes.membership.McastService" address="228.0.0.4" port="45564" frequency="500" dropTime="3000"/>

          <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver" address="auto" port="5000" selectorTimeout="100" maxThreads="6"/>

         <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">

         <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>

          </Sender>

          <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>

          <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>

     <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>

     </Channel>

     <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>

     </Cluster>
</Engine>

I was following this tutorial to setup a load balancer but its not working. After starting httpd and tomcat in httpd error log I am getting this error message-

[Wed Mar 13 18:23:51 2013] [error] proxy: CLUSTER: (balancer://cluster). All workers are in error state

When ever I try to open 192.168.9.73:9999

code13
  • 173
  • 3
  • 9

1 Answers1

1

There was a mistake in my configuration. Followed tutorial on mod_cluster page and added EnableMCPMReceive attribute.

mod_cluster reference link.

code13
  • 173
  • 3
  • 9