tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Vlad.Ilysche...@informa.com>
Subject RE: dodgy session class
Date Sun, 13 Feb 2005 01:32:14 GMT
thanks for your reply Peter. 

unfortunately none of the applications has explicitly configured sessions manager.

I have managed to consistently reproduce the problem. The problem involves two webapps, app1
and app2. App1 is distributable. App2 contains a filter that forwards requests to app1. As
it turns out all sessions created via filter are instances of StandardSession! This is with
app1 being distributable and with cluster session manager. Making app2 distributable doesnt
seem to have any effect on the sessions that are being created in app1 context.

I've attached a test case with two sample webapps, to run them you just have to make sure
crossContext is enabled for app2 and context of app1 is actually called "/app1". App1 does
some nasty hack to display what Class is actually hiding behind session facade, so you would
have to excuse me for that.

Another thing that i've noticed along the way: if a request goes to app1 via filter in app2
two sessions are created, one for each context. Filter in app2 does not create sessions explicitly
(as you will see from the example) and session would not be created for app2 context if filter
didnt forward requests to "app1" context. The question is why session gets created implicitly
in context of "app2"? It is not that I cannot live with it, just cant think of a logical explanation
to this. Ideas anyone?

Regards,
Vlad


-----Original Message-----
From:	Peter Rossbach [mailto:pr@objektpark.de]
Sent:	Sat 2/12/2005 9:22 AM
To:	Tomcat Users List
Cc:	
Subject:	Re: dodgy session class
Hmm,

please check that all your applications with distributable=true have no 
configured Manager in there context.xml's

regards
Peter

Filip Hanik - Dev schrieb:

>Any chance you have a test case to reproduce this?
>Shouldn't happen, unless the way sessions are created have changed.
>
>Filip
>
>----- Original Message -----
>From: <Vlad.Ilyschenko@informa.com>
>To: <tomcat-user@jakarta.apache.org>
>Sent: Friday, February 11, 2005 11:47 AM
>Subject: dodgy session class
>
>
>Hi,
>
>
>
>I'm running tomcat 5.0.30 on two machines A and B (Linux RHAS3).
>
>
>
>When tomcat A restarts it fails to sync session state with "session
>state not received" or something to that effect and tomcat B logs this
>message:
>
>
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] ERROR
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>Unable to receive message through TCP channel
>
>java.lang.ClassCastException
>
>        at
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR
>eceived(SimpleTcpReplicationManager.java:530)
>
>        at
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD
>ataReceived(SimpleTcpReplicationManager.java:596)
>
>        at
>org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim
>pleTcpCluster.java:580)
>
>        at
>org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70
>)
>
>        at
>org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep
>licationThread.java:129)
>
>        at
>org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT
>hread.java:67)
>
>
>
>I changed SimpleTcpReplicationManager to output class names of the
>sessions it is trying to cast to ReplicatedSession and got the following
>picture:
>
>
>
>11 Feb 2005 17:21:44 [Cluster-MembershipReceiver] INFO
>org.apache.catalina.cluster.tcp.SimpleTcpCluster  - Replication member
>added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.56.21:
>4001,192.168.56.21,4001, alive=3]
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>SessionClass=org.apache.catalina.session.StandardSession
>
>11 Feb 2005 17:21:49
>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] ERROR
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>Unable to receive message through TCP channel
>
>java.lang.ClassCastException
>
>        at
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR
>eceived(SimpleTcpReplicationManager.java:530)
>
>        at
>org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD
>ataReceived(SimpleTcpReplicationManager.java:596)
>
>        at
>org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim
>pleTcpCluster.java:580)
>
>        at
>org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70
>)
>
>        at
>org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep
>licationThread.java:129)
>
>        at
>org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT
>hread.java:67)
>
>
>
>
>
>How come a clustered application would have sessions of type
>org.apache.catalina.session.StandardSession? Does anyone have any ideas?
>
>
>
>Regards,
>
>Vlad
>
>
>
>
>********************************************************************************
>The information contained in this email message may be confidential. If you are not the
intended recipient, any use, interference
>with, disclosure or copying of this material is unauthorised and prohibited. Although
this message and any attachments are believed
>to be free of viruses, no responsibility is accepted by T&F Informa for any loss or
damage arising in any way from receipt or use
>thereof.  Messages to and from the company are monitored for operational reasons and in
accordance with lawful business practices.
>If you have received this message in error, please notify us by return and delete the
message and any attachments.  Further
>enquiries/returns can be sent to postmaster@tfinforma.com
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org







Mime
View raw message