You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andy Chapman <an...@brighterworking.com> on 2012/03/22 09:16:20 UTC

Session replication problem

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)



Re: Session replication problem

Posted by Mark Thomas <ma...@apache.org>.
On 22/03/2012 08:16, Andy Chapman wrote:
> 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)

It is this one.

Mark

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


Re: Session replication problem

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andy,

On 3/22/12 4:16 AM, Andy Chapman wrote:
> 1. The Tomcat versions are different (7.0.4 and 7.0.20)

Note that Tomcat 7.0.6 was the first non-beta version of Tomcat 7. You
should definitely upgrade the 7.0.4 version to 7.0.20 and I suspect
things will start working better.

> 2. The Java versions are different (1.6.0_22 for i386_and 1.6.0_27
> for x64)

That might have been an issue, but the exception clearly shows
Tomcat's SerialMessageImpl class. Perhaps there will be other problems
after this one is cleared-up, but most Serializable classes in the JDK
are cross-version-compatible.

> 3. One server is 32 bit CentOS and the other 64 bit

Should never be an issue: bytecode is host architecture agnostic
(that's the whole point).

Upgrade Tomcat and see if that helps.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9rGi4ACgkQ9CaO5/Lv0PCdIQCgs5KjeWFCKtGojufvbqusujXG
i0AAn3S6povTIUumL7VZtKllfhoDgD1H
=0+Te
-----END PGP SIGNATURE-----

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