You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by LERBSCHER Jean-Pierre <je...@cofiroute.fr> on 2004/11/17 11:41:54 UTC

Problem clustering tomcat when a failed server is restarting

We have a cluster Tomcat composed of two servers (default configuration of
the cluster is used).

When the first server is stopped, the cluster continues to work fine
(requests are handled by the server that is running).

But when the stopped server is restarting we can see these exceptions.

 

Could you comment this log and explain us what is wrong. Thanks.

 

The server that handle the requests log this exception

Server 02

   10 nov. 2004 17:13:54 org.apache.catalina.cluster.tcp.SimpleTcpCluster
memberAdded

INFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://w.x.y.z:41001,w.x.
y.z,41001, alive=35]

10 nov. 2004 17:13:54 org.apache.catalina.cluster.session.DeltaManager
messageReceived

GRAVE: Unable to receive message through TCP channel

java.lang.NullPointerException

        at
java.io.ObjectOutputStream$BlockDataOutputStream.getUTFLength(ObjectOutputSt
ream.java:1898)

        at
java.io.ObjectOutputStream$BlockDataOutputStream.writeUTF(ObjectOutputStream
.java:1769)

        at java.io.ObjectOutputStream.writeUTF(ObjectOutputStream.java:787)

        at
org.apache.catalina.cluster.session.SerializablePrincipal.writePrincipal(Ser
ializablePrincipal.java:180)

        at
org.apache.catalina.cluster.session.DeltaSession.writeObject(DeltaSession.ja
va:1457)

        at
org.apache.catalina.cluster.session.DeltaSession.writeObjectData(DeltaSessio
n.java:930)

        at
org.apache.catalina.cluster.session.DeltaManager.doUnload(DeltaManager.java:
539)

        at
org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaManage
r.java:854)

        at
org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(DeltaMa
nager.java:762)

        at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT
cpCluster.java:576)

        at
org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70)

        at
org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica
tionThread.java:129)

        at
org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea
d.java:67)

 

In the same time the server restarting logs this information.

server 01

Creating ClusterManager for context /myapp using class
org.apache.catalina.cluster.session.DeltaManager

10 nov. 2004 17:13:54 org.apache.catalina.cluster.session.DeltaManager start

INFO: Starting clustering manager...:/myapp

10 nov. 2004 17:13:54 org.apache.catalina.cluster.session.DeltaManager start

ATTENTION: Manager[/myapp], requesting session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://w.x.y.z:42001,w.x.y.z,42
001, alive=111640]. This operation will timeout if no session state has been
received within 60 seconds

 

 

After a delay, server 01 logs this information.

10 nov. 2004 17:14:54 org.apache.catalina.cluster.session.DeltaManager start

GRAVE: Manager[/myapp], No session state received, timing out.

10 nov. 2004 17:14:54 org.apache.catalina.core.StandardHostDeployer install

INFO: Installation d'une application pour le chemin de contexte  depuis
l'URL file:/opt/tomcat-tst01/webapps/ROOT

...

INFO: Server startup in 62980 ms

 

server 01 handle the application requests, new session is created.

 

 

 

 

 


Re: Problem clustering tomcat when a failed server is restarting

Posted by Filip Hanik - Dev <de...@hanik.com>.
What version of tomcat?

It fails when it tries to write the principal information to the stream.
Since I don't know what version of tomcat you are using, I can't tell you exactly what went wrong.

maybe something in the principal returns null

Filip



----- Original Message ----- 
From: "LERBSCHER Jean-Pierre" <je...@cofiroute.fr>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, November 17, 2004 4:41 AM
Subject: Problem clustering tomcat when a failed server is restarting


We have a cluster Tomcat composed of two servers (default configuration of
the cluster is used).

When the first server is stopped, the cluster continues to work fine
(requests are handled by the server that is running).

But when the stopped server is restarting we can see these exceptions.

 

Could you comment this log and explain us what is wrong. Thanks.

 

The server that handle the requests log this exception

Server 02

   10 nov. 2004 17:13:54 org.apache.catalina.cluster.tcp.SimpleTcpCluster
memberAdded

INFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://w.x.y.z:41001,w.x.
y.z,41001, alive=35]

10 nov. 2004 17:13:54 org.apache.catalina.cluster.session.DeltaManager
messageReceived

GRAVE: Unable to receive message through TCP channel

java.lang.NullPointerException

        at
java.io.ObjectOutputStream$BlockDataOutputStream.getUTFLength(ObjectOutputSt
ream.java:1898)

        at
java.io.ObjectOutputStream$BlockDataOutputStream.writeUTF(ObjectOutputStream
.java:1769)

        at java.io.ObjectOutputStream.writeUTF(ObjectOutputStream.java:787)

        at
org.apache.catalina.cluster.session.SerializablePrincipal.writePrincipal(Ser
ializablePrincipal.java:180)

        at
org.apache.catalina.cluster.session.DeltaSession.writeObject(DeltaSession.ja
va:1457)

        at
org.apache.catalina.cluster.session.DeltaSession.writeObjectData(DeltaSessio
n.java:930)

        at
org.apache.catalina.cluster.session.DeltaManager.doUnload(DeltaManager.java:
539)

        at
org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaManage
r.java:854)

        at
org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(DeltaMa
nager.java:762)

        at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT
cpCluster.java:576)

        at
org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70)

        at
org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica
tionThread.java:129)

        at
org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea
d.java:67)

 

In the same time the server restarting logs this information.

server 01

Creating ClusterManager for context /myapp using class
org.apache.catalina.cluster.session.DeltaManager

10 nov. 2004 17:13:54 org.apache.catalina.cluster.session.DeltaManager start

INFO: Starting clustering manager...:/myapp

10 nov. 2004 17:13:54 org.apache.catalina.cluster.session.DeltaManager start

ATTENTION: Manager[/myapp], requesting session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://w.x.y.z:42001,w.x.y.z,42
001, alive=111640]. This operation will timeout if no session state has been
received within 60 seconds

 

 

After a delay, server 01 logs this information.

10 nov. 2004 17:14:54 org.apache.catalina.cluster.session.DeltaManager start

GRAVE: Manager[/myapp], No session state received, timing out.

10 nov. 2004 17:14:54 org.apache.catalina.core.StandardHostDeployer install

INFO: Installation d'une application pour le chemin de contexte  depuis
l'URL file:/opt/tomcat-tst01/webapps/ROOT

...

INFO: Server startup in 62980 ms

 

server 01 handle the application requests, new session is created.

 

 

 

 

 



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