4 Replies Latest reply on May 29, 2013 12:59 PM by Rishabh Joshi

    JBoss Clustering with Lighttpd Load Balancing displays inconsistent behaviour

    Rishabh Joshi Newbie


      We have two JBossAS 4.2.3 installed on separate machines and they are clustered. We also make use of Lighttpd that acts as load balancer, and is placed between our Tomcat servers (the Tomcat servers are not clustered) and the JBoss servers. Once all servers are up and running, the application runs flawlessly. If I bring down one JBoss server, the requests are redirected to the other server, as expected. My problem starts after I logout of the application. On trying to re-login into the application, I get an exception that says, Tomcat cannot connect to the server that was brought down.


      1. Machine01 - Tomcat7
      2. Machine02 - Tomcat7
      3. Machine03 - JBoss 4.2.3
      4. Machine04 - JBoss 4.2.3
      5. Machine05 - Lighttpd 1.4.28



      • All machines use Ubuntu 12.04 OS.
      • JBoss machines are clustered.
      • The EAR is dropped in the all/deploy folder.
      • The JBossAS are started using the following command - ./run.sh -b -c all --partition=SomePartitionName &> /dev/null &.
      • Tomcat7 run as a service, hence they are started as sudo service tomcat7 start.
      • The Lighttpd is configured to work as a load balancer for the JBoss machines.
      • The following the mod_proxy configuration on lighttpd:
        server.modules += ( "mod_proxy" )
        proxy.balance = "fair"
        proxy.server = ( "" => (( "host" => "Machine03", "port" => 1100 ), ( "host" => "Machine04", "port" => 1100 ))
      • The jndi.properties have the following entry 




      Unable to figure out why, after I bring down a machine and logout from the application, the Tomcats do not have a proxy-reference to the JBoss machines anymore.

      Can someone guide me and tell me where I am going wrong?