You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jimmy Chang <ch...@gmail.com> on 2015/07/31 15:15:49 UTC

Unable to deserialize message:ClusterData

Hi,

When I uncomment the line
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
in server.xml and restart tomcat.

I got the following error message.

SEVERE [Tribes-Task-Receiver-6] 
org.apache.catalina.tribes.group.GroupChannel.messageReceived Unable to 
deserialize 
message:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 
0, 1, 1}:4000,{127, 0, 1, 1},4000, alive=93539     48554, securePort=-1, 
UDP Port=-1, id={-16 88 -120 -72 11 -128 79 55 -116 -66 -101 -52 96 -27 
-117 122 }, payload={}, command={}, domain ={}, ]; id={82 5 125 66 -125 
-81 70 8 -80 -69 30 89 -42 -3 -116 -102 }; sent=2015-07-31 20:41:02.308]
java.io.InvalidClassException: 
org.apache.catalina.ha.session.SessionMessageImpl; local class 
incompatible: stream classdesc serialVersionUID = 1, local class 
serialVersionUID = 2
        at 
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
        at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
        at 
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
        at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
        at 
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
        at 
org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:552)
        at 
org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:538)
        at 
org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:277)
        at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:81)
        at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:81)
        at 
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:117)
        at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:81)
        at 
org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:261)
        at 
org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:242)
        at 
org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:211)
        at 
org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:102)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)


Here are the tomcat status.

Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr
Using CLASSPATH: 
/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Server version: Apache Tomcat/8.0.24
Server built:   Jul 1 2015 20:19:55 UTC
Server number:  8.0.24.0
OS Name:        Linux
OS Version:     3.8.13-68.3.3.el6uek.x86_64
Architecture:   amd64
JVM Version:    1.8.0_45-b14
JVM Vendor:     Oracle Corporation


How to fix that?
Thanks.


---
Avast 防毒軟體已檢查此封電子郵件的病毒。
https://www.avast.com/antivirus

Re: Unable to deserialize message:ClusterData

Posted by Jimmy Chang <ch...@gmail.com>.
Christopher Schultz 於 2015/7/31 下午 11:23 寫道:
> Are all Tomcat instances in the cluster running the same version of
> Tomcat? Are all instances running the same version of your application?
>
> Do you have any idea which class is being deserialized when this
> happens? A serialVersionUID of "1" or "2" is a bit odd, so I'm
> guessing that's a class from your own application.
>
> - -chris
>
Hi Chris,

The version in all instances is the same.
I've tried to re-install tomcat with default application in instance 
1,shutdown instance 2.
I still got the same error message, so I disabled cluster feature.
Today, I restarted these two tomcat instances with cluster feature 
again, the error message was gone.
I still couldn't figure out what's going on.

Jimmy




---
Avast 防毒軟體已檢查此封電子郵件的病毒。
https://www.avast.com/antivirus


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


Re: Unable to deserialize message:ClusterData

Posted by Jimmy Chang <ch...@gmail.com>.
Christopher Schultz 於 2015/7/31 下午 11:23 寫道:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Jimmy,
>
> On 7/31/15 9:15 AM, Jimmy Chang wrote:
>> When I uncomment the line <Cluster
>> className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> in
>> server.xml and restart tomcat.
>>
>> I got the following error message.
>>
>> SEVERE [Tribes-Task-Receiver-6]
>> org.apache.catalina.tribes.group.GroupChannel.messageReceived
>> Unable to deserialize
>> message:ClusterData[src=org.apache.catalina.tribes.membership.MemberIm
> pl[tcp://{127,
>>
> 0, 1, 1}:4000,{127, 0, 1, 1},4000, alive=93539     48554, securePort=-1,
>> UDP Port=-1, id={-16 88 -120 -72 11 -128 79 55 -116 -66 -101 -52 96
>> -27 -117 122 }, payload={}, command={}, domain ={}, ]; id={82 5 125
>> 66 -125 -81 70 8 -80 -69 30 89 -42 -3 -116 -102 }; sent=2015-07-31
>> 20:41:02.308] java.io.InvalidClassException:
>> org.apache.catalina.ha.session.SessionMessageImpl; local class
>> incompatible: stream classdesc serialVersionUID = 1, local class
>> serialVersionUID = 2 at
>> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
>>
>> [snip]
>>
>> Here are the tomcat status.
>>
>> Using CATALINA_BASE:   /usr/local/tomcat Using CATALINA_HOME:
>> /usr/local/tomcat Using CATALINA_TMPDIR: /usr/local/tomcat/temp
>> Using JRE_HOME:        /usr Using CLASSPATH:
>> /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.
> jar
>>
> Server version: Apache Tomcat/8.0.24
>> Server built:   Jul 1 2015 20:19:55 UTC Server number:  8.0.24.0 OS
>> Name:        Linux OS Version:     3.8.13-68.3.3.el6uek.x86_64
>> Architecture:   amd64 JVM Version:    1.8.0_45-b14 JVM Vendor:
>> Oracle Corporation
> Are all Tomcat instances in the cluster running the same version of
> Tomcat? Are all instances running the same version of your application?
>
> Do you have any idea which class is being deserialized when this
> happens? A serialVersionUID of "1" or "2" is a bit odd, so I'm
> guessing that's a class from your own application.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJVu5LrAAoJEBzwKT+lPKRY4EcP/1ig0/HWFOn3L3XbKP4NOy8M
> b0qa4s/GesC1ql60nQPhdTNKoJcTku4mvJbNnpb5dOe4FhOVwdYDz7aeLYIDckp8
> lPDMxHdgFSiRFrOB9GebAjnxVRh94cSg2ayHy/haHk+tcx6sngbCKXl7bAnEqKrD
> yn5jIwulUHBSPtcFKvUOdUYBePZU5Q2LrnuErvBRQj2NF2WH6zWYlsGdrY9fK3Kc
> bMz/+zwnHiB5MzTsDfVQtKW5rxdieQcW9XZdtax0jlNTONZdevu1Syi06/OdFjnf
> AZwi9XVyuRSp7qUZ6ntdDV/m7sOtSI73m2upN9FJB62nG5T5WrN176sP6/hh2bSL
> xJE/zYzzEcMwyih0y9qf6ZE5onX0LDuKIL4e3YZ+KPQRtQJcOBwP+skcvJtgHvT9
> +qvVyR9c/Ytu+yAuxnnRGVHIkEyvfThm7axQpbAT3L6q/z+jxNnqbVeAQCoJLDx8
> ODj31tHvbMa0opMVU17NlVg+UnzyuIEhnEfJOSzoAzChfq97VisLaM+DVyBbvjSt
> O7vXIl9qLL1b7FpCBJ3cUfL27jXmwJJ4xy/vo4b5H2mwidVrJsxavSxv+UkCg1lJ
> zCr5B1hB8prtlHU4nXYXUPJaONMk1uqVFLKis7VSrfB1ma6EsDVyRuGzWKhE5uvP
> F80XTdYR3HnA8OYmyJYa
> =qVkS
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Hi,

It turned out to be a multicast setup problem.
We had a tomcat cluster already running in the LAN with a defualt 
cluster setting(uncomment SimpleTcpCluster.)
When I created this new cluster, I used the defualt setting as well, so 
there was a multicast collision.
After I added another address of McastService in new cluster server.xml, 
the problem solved.

Thanks.
JC



---
Avast 防毒軟體已檢查此封電子郵件的病毒。
https://www.avast.com/antivirus

Re: Unable to deserialize message:ClusterData

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

Jimmy,

On 7/31/15 9:15 AM, Jimmy Chang wrote:
> When I uncomment the line <Cluster
> className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> in
> server.xml and restart tomcat.
> 
> I got the following error message.
> 
> SEVERE [Tribes-Task-Receiver-6] 
> org.apache.catalina.tribes.group.GroupChannel.messageReceived
> Unable to deserialize 
> message:ClusterData[src=org.apache.catalina.tribes.membership.MemberIm
pl[tcp://{127,
>
> 
0, 1, 1}:4000,{127, 0, 1, 1},4000, alive=93539     48554, securePort=-1,
> UDP Port=-1, id={-16 88 -120 -72 11 -128 79 55 -116 -66 -101 -52 96
> -27 -117 122 }, payload={}, command={}, domain ={}, ]; id={82 5 125
> 66 -125 -81 70 8 -80 -69 30 89 -42 -3 -116 -102 }; sent=2015-07-31
> 20:41:02.308] java.io.InvalidClassException: 
> org.apache.catalina.ha.session.SessionMessageImpl; local class 
> incompatible: stream classdesc serialVersionUID = 1, local class 
> serialVersionUID = 2 at 
> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
> 
> [snip]
> 
> Here are the tomcat status.
> 
> Using CATALINA_BASE:   /usr/local/tomcat Using CATALINA_HOME:
> /usr/local/tomcat Using CATALINA_TMPDIR: /usr/local/tomcat/temp 
> Using JRE_HOME:        /usr Using CLASSPATH: 
> /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.
jar
>
> 
Server version: Apache Tomcat/8.0.24
> Server built:   Jul 1 2015 20:19:55 UTC Server number:  8.0.24.0 OS
> Name:        Linux OS Version:     3.8.13-68.3.3.el6uek.x86_64 
> Architecture:   amd64 JVM Version:    1.8.0_45-b14 JVM Vendor:
> Oracle Corporation

Are all Tomcat instances in the cluster running the same version of
Tomcat? Are all instances running the same version of your application?

Do you have any idea which class is being deserialized when this
happens? A serialVersionUID of "1" or "2" is a bit odd, so I'm
guessing that's a class from your own application.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVu5LrAAoJEBzwKT+lPKRY4EcP/1ig0/HWFOn3L3XbKP4NOy8M
b0qa4s/GesC1ql60nQPhdTNKoJcTku4mvJbNnpb5dOe4FhOVwdYDz7aeLYIDckp8
lPDMxHdgFSiRFrOB9GebAjnxVRh94cSg2ayHy/haHk+tcx6sngbCKXl7bAnEqKrD
yn5jIwulUHBSPtcFKvUOdUYBePZU5Q2LrnuErvBRQj2NF2WH6zWYlsGdrY9fK3Kc
bMz/+zwnHiB5MzTsDfVQtKW5rxdieQcW9XZdtax0jlNTONZdevu1Syi06/OdFjnf
AZwi9XVyuRSp7qUZ6ntdDV/m7sOtSI73m2upN9FJB62nG5T5WrN176sP6/hh2bSL
xJE/zYzzEcMwyih0y9qf6ZE5onX0LDuKIL4e3YZ+KPQRtQJcOBwP+skcvJtgHvT9
+qvVyR9c/Ytu+yAuxnnRGVHIkEyvfThm7axQpbAT3L6q/z+jxNnqbVeAQCoJLDx8
ODj31tHvbMa0opMVU17NlVg+UnzyuIEhnEfJOSzoAzChfq97VisLaM+DVyBbvjSt
O7vXIl9qLL1b7FpCBJ3cUfL27jXmwJJ4xy/vo4b5H2mwidVrJsxavSxv+UkCg1lJ
zCr5B1hB8prtlHU4nXYXUPJaONMk1uqVFLKis7VSrfB1ma6EsDVyRuGzWKhE5uvP
F80XTdYR3HnA8OYmyJYa
=qVkS
-----END PGP SIGNATURE-----

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