1 Reply Latest reply on Dec 13, 2010 2:54 AM by jfclere

    Apache mod_jk/Jboss/Tomcat problem

    mzerroug

      Hello folks,

       

      I am running into a problem I need help with. Basically, after careful reading of configurations at the Apache, mod_jk (1.2.28) and Jboss/Tomcat (server.xml, connectors) my web app runs fine for about a couple of hours then stops  processing requests due apparently to errors between mod_jk and the Jboss/Tomcat nodes. I have two Jboss/Tomact nodes (node1 and node2). The error in mod_jk.log is

       

      [Fri Dec 03 16:35:40 2010][32214:3086424672] [info] service::jk_lb_worker.c (1453): All tomcat instances failed, no more workers left (attempt=1, retry=1)
      [Fri Dec 03 16:35:40 2010][32214:3086424672] [info] get_most_suitable_worker::jk_lb_worker.c (981): all workers are in error state for session A4E763A39D20C7A4DECB934C0E089E79.node2
      [Fri Dec 03 16:35:40 2010][32214:3086424672] [info] service::jk_lb_worker.c (1453): All tomcat instances failed, no more workers left (attempt=2, retry=1)
      [Fri Dec 03 16:35:40 2010][32214:3086424672] [info] service::jk_lb_worker.c (1464): All tomcat instances are busy or in error state
      [Fri Dec 03 16:35:40 2010][32214:3086424672] [error] service::jk_lb_worker.c (1469): All tomcat instances failed, no more workers left

       

      My relecant Apache configuration is:

       

      <IfModule prefork.c>
      StartServers       8
      MinSpareServers    5
      MaxSpareServers   20
      ServerLimit      256
      MaxClients       256
      MaxRequestsPerChild  0
      </IfModule>

       

      mod_jk.conf:

       

      # Define a template to be used by all nodes
      worker.template.type=ajp13
      worker.template.lbfactor=1
      worker.template.ping_timeout=1000
      worker.template.ping_mode=A
      worker.template.socket_timeout=10
      worker.template.connection_pool_timeout=60
      worker.template.recovery_options=1

       

      # Define node1
      worker.node1.reference=worker.template
      worker.node1.port=8009
      worker.node1.host=10.0.51.10
      worker.node1.domain=node1.rebt.com
      worker.node1.session_cookie=node1

       

      # Define node2
      worker.node2.reference=worker.template
      worker.node2.port=8009
      worker.node2.host=10.0.51.11
      worker.node2.domain=node2.rebt.com
      worker.node2.session_cookie=node2

       

      # Define load balancer for nodes 1, 2
      worker.loadbalancer.type=lb
      worker.loadbalancer.balance_workers=node1,node2
      worker.loadbalancer.method=R
      worker.loadbalancer.sticky_session=1
      worker.loadbalancer.sticky_session_force=1

       

      server.xml (for node1; same for node2)

       

      <Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3"
               emptySessionPath="true" enableLookups="true" redirectPort="8443" maxThreads="256"
                 connectionTimeout="60000" />

       

            <Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1">

       

       

      I would greatly appreciate any help / hints you may provide on this.

       

      Moze