2 Replies Latest reply on Mar 29, 2004 10:55 AM by gugusamchil

    can not sticky sessions .... why.

    gugusamchil Newbie

      hi

      I've configured serve1 jboss3.2.3 with apache 1.3.x and mod_jk2 connector on Redhat9,
      and server2 configured only jboss3.2.3 on RedHat9.

      The load balancing works correctly, but i'm having a few problems getting the sticky sessions to work.

      I'll post my workers2.properties below

      Thanks in advance for any assistance!


      workers2.properties
      ----------------------------
      #Log file, replace APACHE_HOME by your Apache installation directory
      [shm]
      file= /var/logs/httpd/mod_jk2.log
      size=1048576

      # The load balancer
      [lb:lb]

      # Server 1, override port and host.
      [channel.socket:IP of server1's:8009]
      port=8009
      host=IP of server1's
      tomcatId=IP of server1's:8009

      # Server 2, override port and host.
      [channel.socket:IP of server2's:8009]
      port=8009
      host=IP of server2's
      tomcatId=IP of server2's:8009

      #define worker for server1
      [ajp13:IP of server1's:8009]
      channel=channel.socket:IP of server1's:8009
      group=lb

      #define worker for server2
      [ajp13:IP of server2's:8009]
      channel=channel.socket:IP of server2's:8009
      group=lb

      #Uri mapping
      [uri:/*]
      group=lb
      ---------------------

      and I add jvmRoute=IP of server1's at jboss-server.xml


      I'll post to errorlog
      ----------------------
      [月 3月 29 12:53:24 2004] (error) [jk_worker_lb.c (415)]: lb.service() unrecov
      erable error...
      [月 3月 29 12:53:24 2004] (error) [mod_jk2.c (427)]: mod_jk.handler() Error co
      nnecting to tomcat 21000
      [月 3月 29 13:23:07 2004] (error) [jk_endpoint.c (90)]: workerEnv.init() creat
      e slot epStat.7 failed
      [月 3月 29 13:23:07 2004] (error) [jk_worker_lb.c (402)]: lb.service() worker
      failed 21000 for ajp13:IP of server1's:8009
      [月 3月 29 13:23:07 2004] (error) [jk_worker_lb.c (415)]: lb.service() unrecov
      erable error...
      [月 3月 29 13:23:07 2004] (error) [mod_jk2.c (427)]: mod_jk.handler() Error co
      nnecting to tomcat 21000
      ----------------------


        • 1. Re: can not sticky sessions .... why.
          Sacha Labourey Master

          You need to assign a worker id in your Tomcat engine configuration:

          <Server>
           <Service name="JBoss-Tomcat">
           <Engine name="MainEngine" defaultHost="localhost"
           jvmRoute="node1">
           <Logger className="org.jboss.web.tomcat.Log4jLogger"
          


          Cheers,


          sacha

          • 2. Re: can not sticky sessions .... why.
            gugusamchil Newbie

            hi sacha
            It replies and Thank you.

            Please tell me detail? What is the 'node1'. What is the worke id?
            node is partition name?

            i'll modified jboss-service.xml below
            server1
            -----------------------------------------
            <Engine jvmRoute="IP of server1's" name="MainEngine" defaultHost="IP of server1's">
            -----------------------------------------

            server2
            -----------------------------------------
            <Engine jvmRoute="IP of server1's" name="MainEngine" defaultHost="IP of server2's">
            -----------------------------------------

            lee.