Hi,

server.xml is rather long, and I'm not sure if attachments are allowed
to be used in lists like this. But here is the part related to
clustering configuration (it is identical in both nodes):

      <Host name="localhost" appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
        <Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
                 receiver.tcpListenAddress="10.65.16.202">
          <ClusterListener
className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
          <ClusterListener
className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderLi
stener"/>
          <Valve
className="org.apache.catalina.cluster.tcp.ReplicationValve"
 
filter=".*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html
;.*\.txt;"
                 primaryIndicator="true" />
          <Valve
className="org.apache.catalina.cluster.session.JvmRouteBinderValve"
enabled="true"/>
        </Cluster>
      </Host>

Also this is configured in server.xml:

<Engine name="Catalina" defaultHost="localhost" jvmRoute="lupus">

In the other host, there is of course different value for jvmRoute. If
you need full server.xml please let me know.

And here is the context.xml:

<!-- The contents of this file will be loaded for each web application
-->
<Context distributable="true">

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat
restarts -->
    <!--
    <Manager pathname="" />
    -->

</Context>


One more piece of information I forgot from the original mail: tomcat
version is 5.5.23.

-Petteri


-----Original Message-----
From: Giancarlo Frison [mailto:[EMAIL PROTECTED] 
Sent: 20. joulukuuta 2007 14:32
To: Tomcat Users List
Subject: Re: Clsutering problem

Hi,
Could you add server.xml and context.xml please?
Bye

Giancarlo Frison

Petteri Heinonen ha scritto:
> Hello all. I'm trying to setup my first Tomcat cluster here. After
some
> tuning I have reached the point where I think that cluster is formed
> fine upon startup, and sessions are also replicated as expected. My
test
> scenario is the simplest possible:
>
> 1) Send first request of the session to node 1 (named "lupus" in my
test
> setup).
> 2) From the response, extract JSESSIONID cookie.
> 3) Add that cookie to second request, and send the request to node 2
> (named "gulo" in my test setup).
>
> At step 3, I would expect that the request would be handled normally,
as
> part of the session. But instead, node 2 determines that session is
> expired, and creates a new session. Thus, our application at node 2
has
> to start everything from the beginning.
>
> Logs of the both request are below. Interesting part is at the end
where
> node 2 says:
>
> Dec 20, 2007 1:21:08 PM
org.apache.catalina.cluster.session.DeltaManager
> sessionExpired
> FINE: Manager [/cgw]: create session message
> [55D51A39AC9094788066C9332B2EEB8E.gulo] expire.
>
> Any suggestions of what might be wrong?
>
> Logs:
>
> Request 1, Node 1 (named "lupus"):
>
> Dec 20, 2007 1:21:02 PM
org.apache.catalina.cluster.session.DeltaManager
> sendCreateSession
> FINE: Manager [/cgw] send new session
> (55D51A39AC9094788066C9332B2EEB8E.lupus)
> Dec 20, 2007 1:21:02 PM org.apache.catalina.cluster.tcp.DataSender
> openSocket
> FINE: Sender open socket to [10.65.16.201:8,015] (open count 16)
> Dec 20, 2007 1:21:02 PM
org.apache.catalina.cluster.session.DeltaManager
> createSession
> FINE: Created a DeltaSession with Id
> [55D51A39AC9094788066C9332B2EEB8E.lupus] Total count=1
> Dec 20, 2007 1:21:02 PM
org.apache.catalina.cluster.tcp.ReplicationValve
> sendSessionReplicationMessage
> FINE: Invoking replication request on /cgw/cgw/
> Dec 20, 2007 1:21:02 PM
org.apache.catalina.cluster.session.DeltaManager
> requestCompleted
> FINE: Manager [/cgw]: create session message
> [55D51A39AC9094788066C9332B2EEB8E.lupus] delta request.
>
> Request 1, Node 2 (named "gulo");
>
> Dec 20, 2007 1:21:02 PM
org.apache.catalina.cluster.tcp.SimpleTcpCluster
> receive
> FINE: Assuming clocks are synched: Replication for
> 55D51A39AC9094788066C9332B2EEB8E.lupus-1198149662381 took=17 ms.
> Dec 20, 2007 1:21:02 PM
org.apache.catalina.cluster.session.DeltaManager
> messageReceived
> Dec 20, 2007 1:21:02 PM
org.apache.catalina.cluster.session.DeltaManager
> handleSESSION_CREATED
> FINE: Manager [/cgw]: received session
> [55D51A39AC9094788066C9332B2EEB8E.lupus] created.
> Dec 20, 2007 1:21:02 PM
> org.apache.catalina.cluster.tcp.ClusterReceiverBase
> addReceivedProcessingStats
> FINE: Calc msg send time total=0ms num request=499 average per
msg=0ms.
> Dec 20, 2007 1:21:02 PM
org.apache.catalina.cluster.tcp.SimpleTcpCluster
> receive
> FINE: Assuming clocks are synched: Replication for
> 55D51A39AC9094788066C9332B2EEB8E.lupus-1198149662413 took=4 ms.
> Dec 20, 2007 1:21:02 PM
org.apache.catalina.cluster.session.DeltaManager
> messageReceived
> Dec 20, 2007 1:21:02 PM
org.apache.catalina.cluster.session.DeltaManager
> handleSESSION_DELTA
> FINE: Manager [/cgw]: received session
> [55D51A39AC9094788066C9332B2EEB8E.lupus] delta.
>
> Request 2, Node 1:
>
> Dec 20, 2007 1:21:08 PM
org.apache.catalina.cluster.tcp.SimpleTcpCluster
> receive
> FINE: Assuming clocks are synched: Replication for
>
55D51A39AC9094788066C9332B2EEB8E.lupus#-#localhost#-#/cgw#-#0#-#11981496
> 68417 took=8 ms.
> Dec 20, 2007 1:21:08 PM
> org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener
> messageReceived
> FINE: Cluster JvmRouteSessionIDBinderListener received orginal session
> ID [55D51A39AC9094788066C9332B2EEB8E.lupus] set to new id
> [55D51A39AC9094788066C9332B2EEB8E.gulo] for context path [/cgw]
> Dec 20, 2007 1:21:08 PM
> org.apache.catalina.cluster.tcp.ClusterReceiverBase
> addReceivedProcessingStats
> FINE: Calc msg send time total=0ms num request=29 average per msg=0ms.
> Dec 20, 2007 1:21:08 PM
org.apache.catalina.cluster.tcp.SimpleTcpCluster
> receive
> FINE: Assuming clocks are synched: Replication for
> 55D51A39AC9094788066C9332B2EEB8E.gulo-EXPIRED-MSG took=3 ms.
> Dec 20, 2007 1:21:08 PM
org.apache.catalina.cluster.session.DeltaManager
> messageReceived
> Dec 20, 2007 1:21:08 PM
org.apache.catalina.cluster.session.DeltaManager
> handleSESSION_EXPIRED
> FINE: Manager [/cgw]: received session
> [55D51A39AC9094788066C9332B2EEB8E.gulo] expired.
>
> Request 2, Node 2:
>
> Dec 20, 2007 1:21:08 PM
org.apache.catalina.cluster.tcp.ReplicationValve
> createPrimaryIndicator
> FINE: Context /cgw: Primarity of session
> 55D51A39AC9094788066C9332B2EEB8E.lupus in request attribute
> org.apache.catalina.cluster.tcp.isPrimarySession is false.
> Dec 20, 2007 1:21:08 PM
> org.apache.catalina.cluster.session.JvmRouteBinderValve getManager
> FINE: Found Cluster DeltaManager
> [EMAIL PROTECTED] at /cgw
> Dec 20, 2007 1:21:08 PM
> org.apache.catalina.cluster.session.JvmRouteBinderValve handleJvmRoute
> FINE: Detected a failover with different jvmRoute - orginal route:
> [lupus] new one: [gulo] at session id
> [55D51A39AC9094788066C9332B2EEB8E.lupus]
> Dec 20, 2007 1:21:08 PM
> org.apache.catalina.cluster.session.JvmRouteBinderValve getManager
> FINE: Found Cluster DeltaManager
> [EMAIL PROTECTED] at /cgw
> Dec 20, 2007 1:21:08 PM
> org.apache.catalina.cluster.session.JvmRouteBinderValve
> setNewSessionCookie
> FINE: Setting cookie with session id
> [55D51A39AC9094788066C9332B2EEB8E.gulo] name: [JSESSIONID] path:
[/cgw]
> secure: [false]
> Dec 20, 2007 1:21:08 PM
> org.apache.catalina.cluster.session.JvmRouteBinderValve
changeSessionID
> FINE: Set Orginal Session id at request attriute
> org.apache.catalina.cluster.session.JvmRouteOrignalSessionID value:
> 55D51A39AC9094788066C9332B2EEB8E.lupus
> Dec 20, 2007 1:21:08 PM
> org.apache.catalina.cluster.session.JvmRouteBinderValve
changeSessionID
> FINE: Changed session from [55D51A39AC9094788066C9332B2EEB8E.lupus] to
> [55D51A39AC9094788066C9332B2EEB8E.gulo]
> Dec 20, 2007 1:21:08 PM org.apache.catalina.cluster.tcp.DataSender
> openSocket
> FINE: Sender open socket to [10.65.16.202:8,015] (open count 11)
> Dec 20, 2007 1:21:08 PM
> org.apache.catalina.cluster.session.JvmRouteBinderValve
> handlePossibleTurnover
> FINE: Turnover Check time 7 msec
> Dec 20, 2007 1:21:08 PM
org.apache.catalina.cluster.session.DeltaManager
> sessionExpired
> FINE: Manager [/cgw]: create session message
> [55D51A39AC9094788066C9332B2EEB8E.gulo] expire.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to