load balancing 2 tomcats on 1 machine question
Hi, I thought I had this sussed but it seems I haven't :( 2 tomcats, 1 machine, JK to balance with stick sessions. The following configuration works in that JK routes requests to both the tomcats and so on. The issue is that if I look in the access logs for each tomcat I can see that 1 session gets spread across both tomcats rather than staying on one. This question is ever so slightly related to a post earlier today by a poster who was seeing JK actually stay with the same tomcat, but still create a new session. My issue is that the requests do not stay with the same tomcat. Is anyone able to suggest why this is? Regards, Allistair. workers.tomcat_home=d:\jakarta-tomcat workers.java_home=c:\Program Files\Java\jdk1.5.0 ps=\ worker.list=loadbalancer worker.tomcat1.port=8009 worker.tomcat1.host=localhost worker.tomcat1.type=ajp13 worker.tomcat1.lbfactor=1 worker.tomcat1.cachesize=1 worker.tomcat2.port=8109 worker.tomcat2.host=localhost worker.tomcat2.type=ajp13 worker.tomcat2.lbfactor=1 worker.tomcat2.cachesize=1 worker.loadbalancer.type=lb worker.loadbalancer.sticky_session=true worker.loadbalancer.method=R worker.loadbalancer.balanced_workers=tomcat1,tomcat2 worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT
Re: load balancing 2 tomcats on 1 machine question
Allistair Crossley wrote: Hi, I thought I had this sussed but it seems I haven't :( 2 tomcats, 1 machine, JK to balance with stick sessions. The following configuration works in that JK routes requests to both the tomcats and so on. Did you set the jvmRoute=tomcat1 inside server.xml Engine tag for the first and jvmRoute=tomcat2 for the second instance. workers.tomcat_home=d:\jakarta-tomcat workers.java_home=c:\Program Files\Java\jdk1.5.0 ps=\ You don't need that worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr You don't need that too. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: load balancing 2 tomcats on 1 machine question
Hi Mladen, Damn, no, I didn't :) Thanks very much indeed, seems to have done the trick :) Cheers, Allistair. -Original Message- From: Mladen Turk [mailto:[EMAIL PROTECTED] Sent: 18 August 2005 17:17 To: Tomcat Users List Subject: Re: load balancing 2 tomcats on 1 machine question Allistair Crossley wrote: Hi, I thought I had this sussed but it seems I haven't :( 2 tomcats, 1 machine, JK to balance with stick sessions. The following configuration works in that JK routes requests to both the tomcats and so on. Did you set the jvmRoute=tomcat1 inside server.xml Engine tag for the first and jvmRoute=tomcat2 for the second instance. workers.tomcat_home=d:\jakarta-tomcat workers.java_home=c:\Program Files\Java\jdk1.5.0 ps=\ You don't need that worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps )tomcat.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$ (ps)classic$(ps)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)in process.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)in process.stderr You don't need that too. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]