wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Session Replication across clustered tomcat server, some problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Session Replication across clustered tomcat server, some problems" Watch "Session Replication across clustered tomcat server, some problems" New topic
Author

Session Replication across clustered tomcat server, some problems

David Rocks
Ranch Hand

Joined: Apr 24, 2001
Posts: 162
Hi,

I am trying to set up a bunch of clustered servers and I am looking to get session replication across them.

So I deploy 2 servers next to each other and change the HTTP port on one from 8080 to 8090, I install my app that has a HttpSessionListener that simply writes out the session Id to the console, each server works perfectly on it's own.

I then uncomment this line in server.xml

<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

When I start up the servers I can see that they acknowledge each other but the problem is that each server gives out a new session.

Hit the 8080 server I get a new session
Hit the 8090 server I get a new session
Hit the 8080 server I get a brand new session
Hit the 8090 server I get a brand new session

And so on, Is there something I have to set so that the session is replicated and shared across the server.


Thanks
David Rocks
Ranch Hand

Joined: Apr 24, 2001
Posts: 162
I think I got it. added

</distributable>

to the web.xml for the application.

Brings up new errors but they are serilizable issues that I can fix, so looks like I have got it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session Replication across clustered tomcat server, some problems
 
Similar Threads
How to select memory-to-memory replication settings through wsadmin
SessionCounter in Cluster Weblogic environment
Spring and WebLogic Clustering
Tomcat 5.5.26 Sessions getting replicated but not working via browser
Cluster configuration with managed servers on a single machine