Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tomcat 5 cluster

Status
Not open for further replies.

Bluebanshee01

Technical User
Aug 13, 2003
22
US
Hi all,
I am trying to set up a tomcat5 cluster at least that is what I think I need to do. I want to move away from apache. So I have set up my vhosts and everything works fine. I login and hit a few pages on this peticular site and then I need to submit some information so I go to the submit page it is the redirected to be secure HTTPS and it blows up. Here is the problem I have two web servers running behind a altion hardware load blancer. At the time the page gets redirected the altion thinks it is a new session and sometimes sends traffic to the other webserver. This is my problem. How can I make tomcat keep the session on the same machine that the request came in on throughout the entire time until I logout? That is why I thought I need to cluster. Maybe I don't I really don't know. I believe I need to make tomcat be something like stateful connections.

HELP!!!!


Thanks

Dave
 
Did you mention that this was supposed to be serialized? If so is this example code you sent serialized?
 
The class String is serializable (ie it has a public no-arg constructor, and implements java.io.Serializable).

Because the session var test stores a String, the example is indeed serializable-friendly.

--------------------------------------------------
Free Database Connection Pooling Software
 
Thank you for all the help. I am getting null when I run your b.jsp. This is driving me nuts. Do you have any suggestion where I can go to for some more help?

Thanks again
 
sedj,
I think I may be getting somewhere. I am getting this in the log file now. Do you know what the problem may be?

- Unable to replicate session
java.lang.ClassCastException: org.apache.catalina.session.StandardSession
at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.requestCompleted(SimpleTcpReplicationManager.java:258)
at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:206)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top