Session replication problem

2012-03-24 Thread Andy Chapman
Thanks for the advice. Upgraded the lowest Tomcat installation and 
replication is now working perfectly.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Session replication problem

2012-03-22 Thread Andy Chapman

Hi All,

I'm using tribes session replication between two Tomcat 7 servers and 
getting errors as below. There are various possible causes:


1. The Tomcat versions are different (7.0.4 and 7.0.20)
2. The Java versions are different (1.6.0_22 for i386_and 1.6.0_27 for x64)
3. One server is 32 bit CentOS and the other 64 bit
4. Something else

Obviously, everything should be the same in an ideal world and I should 
be on the latest Java and Tomcat versions but if the OS (32 vs 64 bit) 
is the problem there is little point me starting the upgrades on the 
other stuff as I'll need to replace some tin.


I thought the problem was bound to be the JVM versions being different 
and there being a default serialVersionUID somewhere. However I've tried 
a few different versions of Tomcat 7 and Java 6 talking to each other in 
a sandbox environment and I don't get the errors. This is possibly 
because I can't exactly duplicate the various version numbers of the 
problem environment in the sandbox.


Interestingly, the errors at each end are exactly the same; both ends of 
the cluster link complain of the same incoming serialVersionUID.


Suggestions for locating the problem much appreciated. Also, if there is 
a way to log information about the incoming serialized class so I can 
figure out which class is the problem.


Cheers


SEVERE: Unable to deserialize 
message:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{172, 
20, 12, 9}:4000,{172, 20, 12, 9},4000, alive=3408387, securePort=-1, UDP 
Port=-1, id={-79 85 122 -111 63 -9 75 88 -88 126 125 -55 80 -79 115 95 
}, payload={}, command={}, domain={}, ]; id={109 33 -19 38 45 -50 70 -79 
-120 -113 -88 -125 -118 -67 126 34 }; sent=2012-03-09 02:53:23.878]
java.io.InvalidClassException: 
org.apache.catalina.ha.session.SessionMessageImpl; local class 
incompatible: stream classdesc serialVersionUID = -544811529010945101, 
local class serialVersionUID = 1
at 
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
at 
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
at 
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at 
org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:568)
at 
org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:554)
at 
org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:261)
at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
at 
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:113)
at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
at 
org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:253)
at 
org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:287)
at 
org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:212)
at 
org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:101)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)




Who gets which request?

2011-09-20 Thread Andy Chapman

I have a Tomcat 7.0.16 install with two WAR based webapps in it.

First test case:
Two war files in /webapps at startup
1. ROOT.war
2. another.war
If I request http://localhost:8080/another/something it goes to the 
another webapp.


Second test case:
Two war files in /webapps at startup
1. ROOT.war
2. wibble.war
If I request http://localhost:8080/wibble/something it goes to the ROOT 
webapp.


Third test case:
One war file in /webapps at startup
1. ROOT.war
Second war file added to /webapps after startup (with 
auto-deploy on)

2. another.war
If I request http://localhost:8080/another/something it goes to the ROOT 
webapp.


It looks like Tomcat is adding the webapps contexts to it's "filter" 
list in alphabetical order at startup and then adding any auto-deployed 
WARs afterwards but I can't believe it is that simple. Can anyone 
give/link to a proper explanation?


Cheers





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org