1 Reply Latest reply on Mar 22, 2004 2:20 PM by nickman

    Puzzle With  Tomcat Session Replication

      I am hitting this issue with Tomcat session replication in JBoss 3.2.3. I have 2 servers, app1 and app2. I log into my app and my load balancer sends me to app1. Once I am logged in, I can snoop my session on app1 and see all the values I expect.

      I also browse the DistributedState MBean for my partition, and when I list the values in CMPClusteredInMemoryPersistenceManager-ClusteredHTTPSession, I can see the session Id on both app1 and app2.

      However, when I contrive a web server failure on app1, and my browser sends the request to app2, the request does not find a matching session and it logs me out. I fired up the snooper, and I found that the HTTPSession existed in app1, but did not exist in app2, even though app2 had the session id in distributed state.

      In summary, it looks like the servlet request (org.apache.coyote.tomcat4.CoyoteRequest) is not reading from distributed state to "find" the session.

      I have tested with both settings:

      <attribute name="SnapshotMode">instant</attribute>
       <attribute name="SnapshotInterval">2000</attribute>
      

      and

      <attribute name="SnapshotMode">interval</attribute>
       <attribute name="SnapshotInterval">2000</attribute>


      My web.xml also has the
      <distributable/>
      tag in it.

      I have not attempted the new 3.2.3 replication tags in the jboss-web.xml, because it seems the basic session replication is not occuring. If I found a session on app2

        • 1. Re: Puzzle With  Tomcat Session Replication

          One additional thing I am looking at is this entry in the server.log:

          12:12:02,188 INFO [org.jboss.web.tomcat.tc4.EmbeddedTomcatService] deploy, ctxPath=, warUrl=file:/D:/jboss-3.2.3/server/net4cluster/tmp/deploy/tmp1312net4.ear-contents/net4.war/
          12:12:02,485 INFO [org.jboss.web.tomcat.tc4.EmbeddedTomcatService] ClusteredHTTPSessionService found
          12:12:02,501 INFO [org.jboss.web.tomcat.tc4.EmbeddedTomcatService] Enabled clustering support for ctxPath=
          


          I am wondering if the defined context of "/" is allowable for a clustered war file, since it seems to result in a ctxPath of null. I thought I saw something about this bug being fixed, but I am not sure.