Hi Eric
Thanx for the config files it works now. The only difference was the
jvmRoute in the server.xml.
There was a typo error in the server.xml file.

Bye
Joshua



-----Original Message-----
From: Roberts, Eric [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 3:37 PM
To: Tomcat Users List
Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache
2.0.43 using mod_JK Connector.


Joshua,

Here are the extracts from my conf files. I am running Apache 2.0.43 with
mod_jk and Tomcat 4.1.18 also, so please check carefully that you have
similar.

workers.properties:

worker.list=tomcat1,tomcat2,loadbalancer

worker.tomcat1.port=9019
worker.tomcat1.host=myhost
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=100

worker.tomcat2.port=9029
worker.tomcat2.host=myhost
worker.tomcat2.type=ajp13
worker.tomcat2.lbfactor=100

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1, tomcat2

mod_jk.conf:

JkMount /manager loadbalancer
JkMount /manager/* loadbalancer

JkMount /admin loadbalancer
JkMount /admin/* loadbalancer

JkMount /myapp loadbalancer
JkMount /myapp/* loadbalancer

server.xml on Tomcat 1:

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
           connectionTimeout="20000" redirectPort="8443" debug="0"
           proxyPort="0" maxProcessors="75" tcpNoDelay="true" secure="false"
           enableLookups="true"
           useURIValidationHack="false" scheme="http" port="9019"
           protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
           bufferSize="2048"
           acceptCount="10"
           minProcessors="5">
      <Factory
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
</Connector>

<Engine jvmRoute="tomcat1"
className="org.apache.catalina.core.StandardEngine" debug="0"
        name="Standalone" defaultHost="myhost"
        mapperClass="org.apache.catalina.core.StandardEngineMapper">

server.xml on Tomcat 2

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
           connectionTimeout="20000" redirectPort="8443" debug="0"
           proxyPort="0" maxProcessors="75" tcpNoDelay="true" secure="false"
           enableLookups="true"
           useURIValidationHack="false" scheme="http" port="9029"
           protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
           bufferSize="2048"
           acceptCount="10"
           minProcessors="5">
      <Factory
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
</Connector>

<Engine jvmRoute="tomcat2"
className="org.apache.catalina.core.StandardEngine" debug="0"
        name="Standalone" defaultHost="myhost"
        mapperClass="org.apache.catalina.core.StandardEngineMapper">

HTH

Eric

-----Original Message-----
From: Joshua Sunil Kumar [mailto:[EMAIL PROTECTED]
Sent: 10 March 2003 10:45
To: Tomcat Users List
Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache
2.0.43 using mod_JK Connector.


Hi
I tried correcting the typo but it does not work .Infact the load balancing
itself doesn't work if I change it to jvmRoute.

BR
Joshua



-----Original Message-----
From: Roberts, Eric [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 2:52 PM
To: Tomcat Users List
Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache
2.0.43 using mod_JK Connector.


There is a typo in the server.xml - it should be jvmRoute.

The worker.list in your workers.properties appears to only contain the
loadbalancer:

  #worker.list=tomcat1,tomcat2,loadbalancer
  worker.list=loadbalancer
  #worker.list=loadbalancer

Uncomment the top line and remove the rest.

Are you using jk or jk2?

Eric


-----Original Message-----
From: Joshua Sunil Kumar [mailto:[EMAIL PROTECTED]
Sent: 10 March 2003 10:14
To: Tomcat Users List
Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache
2.0.43 using mod_JK Connector.


Hi
I check out in the server.xml there is no entry for jvmRoute. There is
something called jmvRoute is it a typo or something cos I corrected it to
jvmRoute and it still does not work

<Engine name="Standalone" defaultHost="localhost" debug="0" jmvRoute="jvm1">

This is tag directly taken from server.xml in the tomcat4.1.18's conf
directory

BR
Joshua

-----Original Message-----
From: Roberts, Eric [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 2:13 PM
To: Tomcat Users List
Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache
2.0.43 using mod_JK Connector.


Filip's memory is correct.

In server.xml you need an entry on the engine element:
    <Engine jvmRoute="tomcat1" .........
then on the next instance
    <Engine jvmRoute="tomcat2" ........
etc.

and your workers.properties file should declare workers tomcat1, tomcat2,
etc

Regards

Eric

-----Original Message-----
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: 10 March 2003 07:36
To: Tomcat Users List
Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache
2.0.43 using mod_JK Connector.


BlankI remember there being a property called jvmRoute in the server.xml
file that would allow the Apache workers to make sure you got the right
Tomcat server upon the next request.

otherwise, you can just cluster enable your system, and it should work for
you.
http://www.filip.net/tomcat-clustering.html

Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
www.filip.net

  -----Original Message-----
  From: Joshua Sunil Kumar [mailto:[EMAIL PROTECTED]
  Sent: Sunday, March 09, 2003 9:52 PM
  To: [EMAIL PROTECTED]
  Subject: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43
using mod_JK Connector.


  Hi
  I'm using Apache2.0.43 and Tomcat4.1.18. I have configured it with
multiple tomcat instances with a load balancer. But I am unable to maintain
sticky session . The application that I am using has to maintain sessions.
But this not happening .When I login the request is JSP so it does to the
first Tomcat after login when I click on any link it goes to the second
Tomcat and I get a session timeout.
  I want to know if any one has configured this version of tomcat for
maintaining sticky session . I am also sending the workers.properties
  # workers.properties
  #

  # In Unix, we use forward slashes:
  ps=/

  # list the workers by name

  #worker.list=tomcat1,tomcat2,loadbalancer
  worker.list=loadbalancer
  #worker.list=loadbalancer
  # ------------------------
  # First tomcat server
  # ------------------------
  worker.tomcat1.port=11009
  worker.tomcat1.host=192.168.146.205
  worker.tomcat1.type=ajp13

  # Specify the size of the open connection cache.
  #worker.tomcat1.cachesize

  #
  # Specifies the load balance factor when used with
  # a load balancing worker.
  # Note:
  #  ----> lbfactor must be > 0
  #  ----> Low lbfactor means less work done by the worker.
  worker.tomcat1.lbfactor=100
  #worker.tomcat1.local_worker=1


  # ------------------------
  # Second tomcat server
  # ------------------------
  worker.tomcat2.port=12009
  worker.tomcat2.host=192.168.146.205
  worker.tomcat2.type=ajp13

  # Specify the size of the open connection cache.
  #worker.tomcat2.cachesize

  #
  # Specifies the load balance factor when used with
  # a load balancing worker.
  # Note:
  #  ----> lbfactor must be > 0
  #  ----> Low lbfactor means less work done by the worker.
  worker.tomcat2.lbfactor=100
  #worker.tomcat2.local_worker=1

  # ------------------------
  # Load Balancer worker
  # ------------------------

  #
  # The loadbalancer (type lb) worker performs weighted round-robin
  # load balancing with sticky sessions.
  # Note:
  #  ----> If a worker dies, the load balancer will check its state
  #        once in a while. Until then all work is redirected to peer
  #        worker.
  worker.loadbalancer.type=lb
  worker.loadbalancer.balanced_workers=tomcat1,tomcat2
  worker.loadbalancer.sticky_session=1
   in Tomcat#worker.loadbalancer.local_worker_only=2

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

**************************Disclaimer************************************************** 
   
 
 Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' 
and 'confidential' and intended for use only by the individual or entity to which it 
is 
addressed. You are notified that any use, copying or dissemination of the information 
contained in the E-MAIL in any manner whatsoever is strictly prohibited.

****************************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to