You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Guntupalli Shanti <sg...@cisco.com> on 2001/04/13 21:54:29 UTC

URGENT - Session stickyness lost with cookies disabled

Hi,

Is anyone successful with mod_jserv load balancing with stickyness when 
cookies disabled?

I am running Tomcat 3.2.1 and apache 1.3.12 with mod_jserv on sun solaris 2.6

I have configured apache for load balancing between 2 unix servers and it
is working fine when cookies are enabled. The requests are load balanced 
between
the 2 servers and session stickyness works fine (once the session is 
established
the request is always routed to the right app server based on the suffix in 
the jsessionid).

But when the cookies are disabled (I am encoding encoding the url) the 
requests are
distributed between server1 and server2 meaning doesn't stick to the same 
app server.
When there is a request from the browser (and the URL has the 
jsessionid.suffix) the
mod_jserv doesn't route it to the right app server based on the suffix in 
the jsessionid
and the session is lost (a new session id is created).

Here is the configuration I have in httpd.conf

<IfModule mod_jserv.c>
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy off
ApJServLogLevel notice
ApJServShmFile /apache/conf/jserv_shm
ApJServLogFile /apache/logs/jserv_log.log

ApJServBalance loadbalancer CCSF1
ApJServBalance loadbalancer CCSF2

ApJServHost CCSF1 ajpv12://server1:port1
ApJServHost CCSF2 ajpv12://server2:port2

ApJServRoute CCSF1 CCSF1
ApJServRoute CCSF2 CCSF2

ApJServMount /myapp/servlet balance://loadbalancer/myapp

</IfModule>


Any help is highly appreciated

-Shanti


RE: URGENT - Session stickyness lost with cookies disabled

Posted by Tim O'Neil <ti...@xythos.com>.
At 04:55 PM 4/13/2001 -0400, "PCP Jiverink" wrote:
>They are exclusive.  Basically, for every link back into the web application
>that needs to maintain session, the programmer must call and EncodeURL
>function so that tomcat can add the JSESSIONID parameter to the URL at
>execution time.
>
>Apache URL rewriting allows the server to 'adjust' the incoming URL so that
>it goes somewhere else.

Ah... Right. Duh. mod_rewrite would have nothing to do with
keeping track of state.


RE: URGENT - Session stickyness lost with cookies disabled

Posted by Guntupalli Shanti <sg...@cisco.com>.
Right...I am using the encode URL and the jsession.suffix is seen in the 
url everytime.
but by clicking or pointing at any of the links in the page shows new 
jsessionid.suffix

At 04:55 PM 4/13/2001 -0400, you wrote:

>They are exclusive.  Basically, for every link back into the web application
>that needs to maintain session, the programmer must call and EncodeURL
>function so that tomcat can add the JSESSIONID parameter to the URL at
>execution time.
>
>Apache URL rewriting allows the server to 'adjust' the incoming URL so that
>it goes somewhere else.
>
>-----Original Message-----
>From: Tim O'Neil [mailto:tim@xythos.com]
>Sent: Friday, April 13, 2001 4:44 PM
>To: tomcat-user@jakarta.apache.org
>Subject: RE: URGENT - Session stickyness lost with cookies disabled
>
>
>At 04:18 PM 4/13/2001 -0400, "CPC Livelink" wrote:
> >Tomcat does support url rewriting, but the developer must have written the
> >web app to support it - otherwise no dice.
>
>What about the rewrite mod in Apache? Are the two
>exclusive or do they work together?


Re: tomcat hangs on stop

Posted by Simon Brooke <si...@beesianum.jasmine.org.uk>.
On Friday 13 April 2001 21:55, you wrote:

> also, i am trying to get tomcat to a jar for jdbc.  i've been placing
> it in different folders (/var/tomcat/lib) for it to find.  i've had
> no luck.  how can i determine which folder tomcat is looking to for
> jar files?

Read the shell scripts. In this case, particularly, read the 
'tomcat.sh' script; $TOMCAT_HOME/lib is right, so assuming on your 
machine $TOMCAT_HOME is /var/tomcat you've put it in the right place. 
Be aware, of course, that if you *don'T* start tomcat with the standard 
scripts, your on your own.

-- 
simon@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/

		[ This .sig subject to change without notice ]


tomcat hangs on stop

Posted by "Andrew B. Luck" <ab...@yahoo.com>.
hello,

i'm a newbie with a linux machine already configured with tomcat.

tomcat starts when the computer boots.  i try to stop it using a script
(/usr/bin/tomcat) with the command 'tomcat stop'.  it hangs with the message
'Stoping tomcat 8007 null'.

also, i am trying to get tomcat to a jar for jdbc.  i've been placing it in
different folders (/var/tomcat/lib) for it to find.  i've had no luck.  how
can i determine which folder tomcat is looking to for jar files?

please help,
-andy


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


RE: URGENT - Session stickyness lost with cookies disabled

Posted by CPC Livelink Admin <cp...@fitzpatrick.cc>.
They are exclusive.  Basically, for every link back into the web application
that needs to maintain session, the programmer must call and EncodeURL
function so that tomcat can add the JSESSIONID parameter to the URL at
execution time.

Apache URL rewriting allows the server to 'adjust' the incoming URL so that
it goes somewhere else.

-----Original Message-----
From: Tim O'Neil [mailto:tim@xythos.com]
Sent: Friday, April 13, 2001 4:44 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: URGENT - Session stickyness lost with cookies disabled


At 04:18 PM 4/13/2001 -0400, "CPC Livelink" wrote:
>Tomcat does support url rewriting, but the developer must have written the
>web app to support it - otherwise no dice.

What about the rewrite mod in Apache? Are the two
exclusive or do they work together?



RE: URGENT - Session stickyness lost with cookies disabled

Posted by Tim O'Neil <ti...@xythos.com>.
At 04:18 PM 4/13/2001 -0400, "CPC Livelink" wrote:
>Tomcat does support url rewriting, but the developer must have written the
>web app to support it - otherwise no dice.

What about the rewrite mod in Apache? Are the two
exclusive or do they work together?


RE: URGENT - Session stickyness lost with cookies disabled

Posted by CPC Livelink Admin <cp...@fitzpatrick.cc>.
Tomcat does support url rewriting, but the developer must have written the
web app to support it - otherwise no dice.

-----Original Message-----
From: Filip Hanik [mailto:mail@filip.net]
Sent: Friday, April 13, 2001 4:05 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: URGENT - Session stickyness lost with cookies disabled


there are only two ways of tracking sessions

1. cookies
2. url rewriting

I don't know that tomcat supports (2)

Filip

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

> -----Original Message-----
> From: Tim O'Neil [mailto:tim@xythos.com]
> Sent: Friday, April 13, 2001 1:02 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: URGENT - Session stickyness lost with cookies disabled
>
>
> At 12:54 PM 4/13/2001 -0700, you wrote:
> >I have configured apache for load balancing between 2 unix servers and it
> >is working fine when cookies are enabled. The requests are load balanced
> >between
> >the 2 servers and session stickyness works fine (once the session is
> >established
> >the request is always routed to the right app server based on the suffix
> >in the jsessionid).
> >
> >But when the cookies are disabled (I am encoding encoding the url) the
> >requests are
> >distributed between server1 and server2 meaning doesn't stick to
> the same
> >app server.
> >When there is a request from the browser (and the URL has the
> >jsessionid.suffix) the
> >mod_jserv doesn't route it to the right app server based on the
> suffix in
> >the jsessionid
> >and the session is lost (a new session id is created).
>
> Wouldn't you necessarily have to have cookies
> enabled to get this to work since http is a
> stateless protocol? I mean, what your asking
> the protocol to do is something it can't do
> without cookies, or something that it can use
> to record session information.
>
>
>
>



RE: URGENT - Session stickyness lost with cookies disabled

Posted by Filip Hanik <ma...@filip.net>.
there are only two ways of tracking sessions

1. cookies
2. url rewriting

I don't know that tomcat supports (2)

Filip

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

> -----Original Message-----
> From: Tim O'Neil [mailto:tim@xythos.com]
> Sent: Friday, April 13, 2001 1:02 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: URGENT - Session stickyness lost with cookies disabled
>
>
> At 12:54 PM 4/13/2001 -0700, you wrote:
> >I have configured apache for load balancing between 2 unix servers and it
> >is working fine when cookies are enabled. The requests are load balanced
> >between
> >the 2 servers and session stickyness works fine (once the session is
> >established
> >the request is always routed to the right app server based on the suffix
> >in the jsessionid).
> >
> >But when the cookies are disabled (I am encoding encoding the url) the
> >requests are
> >distributed between server1 and server2 meaning doesn't stick to
> the same
> >app server.
> >When there is a request from the browser (and the URL has the
> >jsessionid.suffix) the
> >mod_jserv doesn't route it to the right app server based on the
> suffix in
> >the jsessionid
> >and the session is lost (a new session id is created).
>
> Wouldn't you necessarily have to have cookies
> enabled to get this to work since http is a
> stateless protocol? I mean, what your asking
> the protocol to do is something it can't do
> without cookies, or something that it can use
> to record session information.
>
>
>
>


Re: URGENT - Session stickyness lost with cookies disabled

Posted by Tim O'Neil <ti...@xythos.com>.
At 12:54 PM 4/13/2001 -0700, you wrote:
>I have configured apache for load balancing between 2 unix servers and it
>is working fine when cookies are enabled. The requests are load balanced 
>between
>the 2 servers and session stickyness works fine (once the session is 
>established
>the request is always routed to the right app server based on the suffix 
>in the jsessionid).
>
>But when the cookies are disabled (I am encoding encoding the url) the 
>requests are
>distributed between server1 and server2 meaning doesn't stick to the same 
>app server.
>When there is a request from the browser (and the URL has the 
>jsessionid.suffix) the
>mod_jserv doesn't route it to the right app server based on the suffix in 
>the jsessionid
>and the session is lost (a new session id is created).

Wouldn't you necessarily have to have cookies
enabled to get this to work since http is a
stateless protocol? I mean, what your asking
the protocol to do is something it can't do
without cookies, or something that it can use
to record session information.