• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat replication question

 
Jeroen Meijer
Greenhorn
Posts: 5
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I'm trying to setup Tomcat context replication which 3 tomcat nodes and an Apache loadbalancer

I've changed context.xml on each Tomcat instance to

<Context distributable="true" className="org.apache.catalina.ha.context.ReplicatedContext" >

And added the <distributable/> tag to web.xml

I've written a context listener to test if the replication worked



When I look at the Tomcat logs it seems that replication is setup correctly

[Tomcat A]
INFO: Deploying web application directory ContextSharing
25-jan-2011 9:51:33 org.apache.catalina.ha.session.DeltaManager start
INFO: Register manager /ContextSharing to cluster element Engine with name Catal
ina
25-jan-2011 9:51:33 org.apache.catalina.ha.session.DeltaManager start
INFO: Starting clustering manager at /ContextSharing
25-jan-2011 9:51:33 org.apache.catalina.ha.session.DeltaManager getAllClusterSes
sions
INFO: Manager [localhost#/ContextSharing]: skipping state transfer. No members a
ctive in cluster group. -> First tomcat to start, so no members exists
Context init -> Initial context startup, this is okay
init storage
SharedStorage init
Context init end


Everything seems okay

[Tomcat B]
INFO: Starting clustering manager at /ContextSharing
25-jan-2011 9:52:25 org.apache.catalina.ha.session.DeltaManager getAllClusterSes
sions
WARNING: Manager [localhost#/ContextSharing], requesting session state from org.
apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 1, 113}:4000,{192,
168, 1, 113},4000, alive=54015,id={-72 113 40 -25 -51 -71 73 -49 -120 -108 47 8
6 82 -9 53 -17 }, payload={}, command={}, domain={}, ]. This operation will time
out if no session state has been received within 60 seconds.
25-jan-2011 9:52:25 org.apache.catalina.ha.session.DeltaManager waitForSendAllSe
ssions
INFO: Manager [localhost#/ContextSharing]; session state send at 25-1-11 9:52 re
ceived in 109 ms.
Context init
init storage -> What's this?! This should have been done already by Tomcat A
SharedStorage init
Context init end
 
Jeroen Meijer
Greenhorn
Posts: 5
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What am I missing?
 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that's a problem? If I have 3 program using shared storage and I'm not meticulous about my wording, I might use the work "init" to mean "setting up for and connecting to shared storage" as opposed to "setting up and formatting shared storage".
 
Jeroen Meijer
Greenhorn
Posts: 5
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
??
I'm sorry for my English as it is not my native language.

I solved the problem: I forgot to implement Serializable
 
Georges Salameh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to ask you which tomcat version are you using? and what exactly was the error? i know that it was serializable but where it needs to be added?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic