You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eddie Yee <ed...@hotmail.com> on 2007/06/14 21:16:34 UTC

sticky sessions not sticking

Hi,

I am not sure if this is a bug, but it appears that my sticky sessions 
configuration don't want to stick.   I am running two servers with tomcat 
5.5.20 (configured as single servers ie. no session replication) with 
standard ajp13 connector (8009) and one web server running iPlanet 6 with 
tomcat Connector 1.2.23.

The following are my configurations:

Tomcat server.xml
..
..
    <Engine
        defaultHost="localhost"
        jvmRoute="TCTAPP1"               <!-- TCTAPP2 is set for the second 
server  -->
        name="Catalina">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
      <Host
          appBase="webapps"
          name="localhost">
..
..


iPlanet workers.properties

worker.list=balancer
worker.worker1.host=ssatstapp1.xxxxxx.com        #xxx'd out for privacy
worker.worker1.port=8009
worker.worker1.type=ajp13
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=90
worker.worker1.lbfactor=1
worker.worker1.domain=domain1

worker.worker2.host=ssatstapp2.xxxxxx.com
worker.worker2.port=8009
worker.worker2.type=ajp13
worker.worker2.socket_keepalive=1
worker.worker2.socket_timeout=90
worker.worker2.lbfactor=1
worker.worker2.domain=domain1

worker.balancer.type=lb
worker.balancer.balance_workers=worker1,worker2
worker.balancer.method=S
worker.balancer.sticky_session=1
worker.balancer.sticky_session_force=0


iPlanet magnus.conf

Init fn="load-modules" funcs="jk_init,jk_service" 
shlib="/spfs/iplanet/servers/plugins/lib/nsapi_redirector_1_2_23_sol9.so"

Init fn="jk_init" 
worker_file="/spfs/iplanet/servers/plugins/lib/workers.properties" 
log_level="debug" 
log_file="/spfs/iplanet/servers/plugins/lib/nsapi_redirector.log"


iPlanet obj.conf
<Object name="spat2" ppath="*/spat2/*">
ObjectType fn="force-type" type="text/html"
Service fn="jk_service" method="*" worker="balancer"
</Object>


When accessing the application, it occasionally occasionally works but after 
clicking around the application it will get load balanced to the other 
server.  Sometimes it does it right away, sometimes it take a few clicks.

Do you see any problem with the configuration above?

_________________________________________________________________
Need a break? Find your escape route with Live Search Maps. 
http://maps.live.com/default.aspx?ss=Restaurants~Hotels~Amusement%20Park&cp=33.832922~-117.915659&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=1118863&encType=1&FORM=MGAC01


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: sticky sessions not sticking

Posted by Eddie Yee <ed...@hotmail.com>.
Hi Filip.

It looks like that solved the problem!  Thanks for your help!

Eddie



>From: Filip Hanik - Dev Lists <de...@hanik.com>
>Reply-To: "Tomcat Users List" <us...@tomcat.apache.org>
>To: Tomcat Users List <us...@tomcat.apache.org>
>Subject: Re: sticky sessions not sticking
>Date: Thu, 14 Jun 2007 21:44:59 +0200
>
>change your JVM route to
>jvmRoute="worker1", as I believe the jvmRoute value has to match the name 
>of the worker.
>
>Filip
>
>Eddie Yee wrote:
>>Hi,
>>
>>I am not sure if this is a bug, but it appears that my sticky sessions 
>>configuration don't want to stick.   I am running two servers with tomcat 
>>5.5.20 (configured as single servers ie. no session replication) with 
>>standard ajp13 connector (8009) and one web server running iPlanet 6 with 
>>tomcat Connector 1.2.23.
>>
>>The following are my configurations:
>>
>>Tomcat server.xml
>>..
>>..
>>    <Engine
>>        defaultHost="localhost"
>>        jvmRoute="TCTAPP1"               <!-- TCTAPP2 is set for the 
>>second server  -->
>>        name="Catalina">
>>      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
>>      <Host
>>          appBase="webapps"
>>          name="localhost">
>>..
>>..
>>
>>
>>iPlanet workers.properties
>>
>>worker.list=balancer
>>worker.worker1.host=ssatstapp1.xxxxxx.com        #xxx'd out for privacy
>>worker.worker1.port=8009
>>worker.worker1.type=ajp13
>>worker.worker1.socket_keepalive=1
>>worker.worker1.socket_timeout=90
>>worker.worker1.lbfactor=1
>>worker.worker1.domain=domain1
>>
>>worker.worker2.host=ssatstapp2.xxxxxx.com
>>worker.worker2.port=8009
>>worker.worker2.type=ajp13
>>worker.worker2.socket_keepalive=1
>>worker.worker2.socket_timeout=90
>>worker.worker2.lbfactor=1
>>worker.worker2.domain=domain1
>>
>>worker.balancer.type=lb
>>worker.balancer.balance_workers=worker1,worker2
>>worker.balancer.method=S
>>worker.balancer.sticky_session=1
>>worker.balancer.sticky_session_force=0
>>
>>
>>iPlanet magnus.conf
>>
>>Init fn="load-modules" funcs="jk_init,jk_service" 
>>shlib="/spfs/iplanet/servers/plugins/lib/nsapi_redirector_1_2_23_sol9.so"
>>
>>Init fn="jk_init" 
>>worker_file="/spfs/iplanet/servers/plugins/lib/workers.properties" 
>>log_level="debug" 
>>log_file="/spfs/iplanet/servers/plugins/lib/nsapi_redirector.log"
>>
>>
>>iPlanet obj.conf
>><Object name="spat2" ppath="*/spat2/*">
>>ObjectType fn="force-type" type="text/html"
>>Service fn="jk_service" method="*" worker="balancer"
>></Object>
>>
>>
>>When accessing the application, it occasionally occasionally works but 
>>after clicking around the application it will get load balanced to the 
>>other server.  Sometimes it does it right away, sometimes it take a few 
>>clicks.
>>
>>Do you see any problem with the configuration above?
>>
>>_________________________________________________________________
>>Need a break? Find your escape route with Live Search Maps. 
>>http://maps.live.com/default.aspx?ss=Restaurants~Hotels~Amusement%20Park&cp=33.832922~-117.915659&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=1118863&encType=1&FORM=MGAC01
>>
>>
>>
>>---------------------------------------------------------------------
>>To start a new topic, e-mail: users@tomcat.apache.org
>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>

_________________________________________________________________
Hotmail to go? Get your Hotmail, news, sports and much more! 
http://mobile.msn.com


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: sticky sessions not sticking

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
change your JVM route to
jvmRoute="worker1", as I believe the jvmRoute value has to match the 
name of the worker.

Filip

Eddie Yee wrote:
> Hi,
>
> I am not sure if this is a bug, but it appears that my sticky sessions 
> configuration don't want to stick.   I am running two servers with 
> tomcat 5.5.20 (configured as single servers ie. no session 
> replication) with standard ajp13 connector (8009) and one web server 
> running iPlanet 6 with tomcat Connector 1.2.23.
>
> The following are my configurations:
>
> Tomcat server.xml
> ..
> ..
>    <Engine
>        defaultHost="localhost"
>        jvmRoute="TCTAPP1"               <!-- TCTAPP2 is set for the 
> second server  -->
>        name="Catalina">
>      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
>      <Host
>          appBase="webapps"
>          name="localhost">
> ..
> ..
>
>
> iPlanet workers.properties
>
> worker.list=balancer
> worker.worker1.host=ssatstapp1.xxxxxx.com        #xxx'd out for privacy
> worker.worker1.port=8009
> worker.worker1.type=ajp13
> worker.worker1.socket_keepalive=1
> worker.worker1.socket_timeout=90
> worker.worker1.lbfactor=1
> worker.worker1.domain=domain1
>
> worker.worker2.host=ssatstapp2.xxxxxx.com
> worker.worker2.port=8009
> worker.worker2.type=ajp13
> worker.worker2.socket_keepalive=1
> worker.worker2.socket_timeout=90
> worker.worker2.lbfactor=1
> worker.worker2.domain=domain1
>
> worker.balancer.type=lb
> worker.balancer.balance_workers=worker1,worker2
> worker.balancer.method=S
> worker.balancer.sticky_session=1
> worker.balancer.sticky_session_force=0
>
>
> iPlanet magnus.conf
>
> Init fn="load-modules" funcs="jk_init,jk_service" 
> shlib="/spfs/iplanet/servers/plugins/lib/nsapi_redirector_1_2_23_sol9.so"
>
> Init fn="jk_init" 
> worker_file="/spfs/iplanet/servers/plugins/lib/workers.properties" 
> log_level="debug" 
> log_file="/spfs/iplanet/servers/plugins/lib/nsapi_redirector.log"
>
>
> iPlanet obj.conf
> <Object name="spat2" ppath="*/spat2/*">
> ObjectType fn="force-type" type="text/html"
> Service fn="jk_service" method="*" worker="balancer"
> </Object>
>
>
> When accessing the application, it occasionally occasionally works but 
> after clicking around the application it will get load balanced to the 
> other server.  Sometimes it does it right away, sometimes it take a 
> few clicks.
>
> Do you see any problem with the configuration above?
>
> _________________________________________________________________
> Need a break? Find your escape route with Live Search Maps. 
> http://maps.live.com/default.aspx?ss=Restaurants~Hotels~Amusement%20Park&cp=33.832922~-117.915659&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=1118863&encType=1&FORM=MGAC01 
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org