You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "amie.lahey" <am...@lahey.org> on 2008/08/07 21:22:56 UTC

[users@httpd] Apache Http sticky session problem.

Hi All,

I need a urgent help with apache tomcat load balancing:
I have configured Apache 2.2 with multiple tomcat 6 service instances to
achieve load balancing. 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.

This how mow wrokers.properties look like:

####Workers.Properties file####


worker.list=bal1,stat1
worker.Tomcat6_1.type=ajp13
worker.Tomcat6_1.host=172.28.11.4
worker.Tomcat6_1.port=8009
worker.Tomcat6_1.sticky_session=True
worker.Tomcat6_1.method=Session
worker.Tomcat6_1.lbfactor=10
worker.Tomcat6_2.type=ajp13
worker.Tomcat6_2.host=172.28.11.4
worker.Tomcat6_2.port=8010
worker.Tomcat6_2.sticky_session=True
worker.Tomcat6_1.method=Session
worker.Tomcat6_2.lbfactor=10
worker.bal1.type=lb
worker.bal1.sticky_session=True
worker.bal1.balance_workers=Tomcat6_1,Tomcat6_2
worker.bal1.method=Session
worker.stat1.type=status

I have specified the jvm route too in tomcat insatnces server.xml.

Can anyone help?
As after speciefying the sticky session, I am able to login to my
application but if i do it more that 2-3 times...it doesn't redirect me to
the application.
-- 
View this message in context: http://www.nabble.com/Apache-Http-sticky-session-problem.-tp18877839p18877839.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Http sticky session problem.

Posted by "amie.lahey" <am...@lahey.org>.
Hi ROb,

Thanks a lot for replying.
I am using mod_jk and there are just few parameters defined in httpd
1: workers.properties path
2: Jkmount 
3: jkmanager/jkstatus

Can you just specify what exactly quotes did you remove.

Also, i was trying to load balance with mod_proxy first on the same server
but it did not seem to be working for me. I have this set:

1 apache server 2 tomcat servers running as service on the same server.


Thanks

Rob Stewart-5 wrote:
> 
> OK - I'm new to the list, but here's my two cents following my antics...
> 
> 1. Check that the routes in the httpd side configuration files do NOT
> have quotes. (I had a lot of pain with that).
> 
> 2. I'm using a reverse proxy using mod_proxy_balance and mod_proxy_ajp
> (NOT mod_proxy_http) and simpleTcpCluster instead. It worked for me as
> soon as I got the above correct.
> 
>   I'm also running all this on one machine, so your mileage may vary.
> 
>   Good luck.
> 
> -- 
> Rob (rob.rstuff@googlemail.com)
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Apache-Http-sticky-session-problem.-tp18877839p18882862.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Http sticky session problem.

Posted by Rob Stewart <ro...@googlemail.com>.
OK - I'm new to the list, but here's my two cents following my antics...

1. Check that the routes in the httpd side configuration files do NOT
have quotes. (I had a lot of pain with that).

2. I'm using a reverse proxy using mod_proxy_balance and mod_proxy_ajp
(NOT mod_proxy_http) and simpleTcpCluster instead. It worked for me as
soon as I got the above correct.

  I'm also running all this on one machine, so your mileage may vary.

  Good luck.

-- 
Rob (rob.rstuff@googlemail.com)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Http sticky session problem.

Posted by "amie.lahey" <am...@lahey.org>.
Hi corrected that typo but still it does not seem to work!

Richard.Hall wrote:
> 
> I have absolutely no idea whether it is relevant or not, but ...
> 
> On Fri, 8 Aug 2008, amie.lahey wrote:
> [...]
>> > This how mow wrokers.properties look like:
>> >
>> > ####Workers.Properties file####
>> >
>> >
>> > worker.list=bal1,stat1
>> > worker.Tomcat6_1.type=ajp13
>> > worker.Tomcat6_1.host=172.28.11.4
>> > worker.Tomcat6_1.port=8009
>> > worker.Tomcat6_1.sticky_session=True
>> > worker.Tomcat6_1.method=Session
>> > worker.Tomcat6_1.lbfactor=10
>> > worker.Tomcat6_2.type=ajp13
>> > worker.Tomcat6_2.host=172.28.11.4
>> > worker.Tomcat6_2.port=8010
>> > worker.Tomcat6_2.sticky_session=True
>> > worker.Tomcat6_1.method=Session
> 
> ^^^^^^^^^^^^^^^^^^^^ should be _2, not _1, surely ??
> 
>> > worker.Tomcat6_2.lbfactor=10
>> > worker.bal1.type=lb
>> > worker.bal1.sticky_session=True
>> > worker.bal1.balance_workers=Tomcat6_1,Tomcat6_2
>> > worker.bal1.method=Session
>> > worker.stat1.type=status
> [...]
> 
> HTH,
>  Richard
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Apache-Http-sticky-session-problem.-tp18877839p18892409.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Http sticky session problem.

Posted by "Richard.Hall" <Ri...@ingenta.com>.
I have absolutely no idea whether it is relevant or not, but ...

On Fri, 8 Aug 2008, amie.lahey wrote:
[...]
> > This how mow wrokers.properties look like:
> >
> > ####Workers.Properties file####
> >
> >
> > worker.list=bal1,stat1
> > worker.Tomcat6_1.type=ajp13
> > worker.Tomcat6_1.host=172.28.11.4
> > worker.Tomcat6_1.port=8009
> > worker.Tomcat6_1.sticky_session=True
> > worker.Tomcat6_1.method=Session
> > worker.Tomcat6_1.lbfactor=10
> > worker.Tomcat6_2.type=ajp13
> > worker.Tomcat6_2.host=172.28.11.4
> > worker.Tomcat6_2.port=8010
> > worker.Tomcat6_2.sticky_session=True
> > worker.Tomcat6_1.method=Session

^^^^^^^^^^^^^^^^^^^^ should be _2, not _1, surely ??

> > worker.Tomcat6_2.lbfactor=10
> > worker.bal1.type=lb
> > worker.bal1.sticky_session=True
> > worker.bal1.balance_workers=Tomcat6_1,Tomcat6_2
> > worker.bal1.method=Session
> > worker.stat1.type=status
[...]

HTH,
 Richard


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Http sticky session problem.

Posted by "amie.lahey" <am...@lahey.org>.
Hi Folks,

Thanks for all the responses....but i am still not getting it to work
properly!!!!!

This is what is happening:
My application requires authentication, and displays a login on a new
session. When I kill one of the tomcats, the application works fine (i.e.,
the authenticated session is retained and used for each subsequent request).
But if both workers are running, mod_jk ping-pongs between them (which
results in new sessions being created on each request).

The thing I think is most revealing is that when I run with only one worker
alive (so the application works), mod_jk is still trying to round-robin the
two workers.

Any clues.....?
All the jvmRoutes are exactly the same as mentioned by you all!!!!



amie.lahey wrote:
> 
> Hi All,
> 
> I need a urgent help with apache tomcat load balancing:
> I have configured Apache 2.2 with multiple tomcat 6 service instances to
> achieve load balancing. 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.
> 
> This how mow wrokers.properties look like:
> 
> ####Workers.Properties file####
> 
> 
> worker.list=bal1,stat1
> worker.Tomcat6_1.type=ajp13
> worker.Tomcat6_1.host=172.28.11.4
> worker.Tomcat6_1.port=8009
> worker.Tomcat6_1.sticky_session=True
> worker.Tomcat6_1.method=Session
> worker.Tomcat6_1.lbfactor=10
> worker.Tomcat6_2.type=ajp13
> worker.Tomcat6_2.host=172.28.11.4
> worker.Tomcat6_2.port=8010
> worker.Tomcat6_2.sticky_session=True
> worker.Tomcat6_1.method=Session
> worker.Tomcat6_2.lbfactor=10
> worker.bal1.type=lb
> worker.bal1.sticky_session=True
> worker.bal1.balance_workers=Tomcat6_1,Tomcat6_2
> worker.bal1.method=Session
> worker.stat1.type=status
> 
> I have specified the jvm route too in tomcat insatnces server.xml.
> 
> Can anyone help?
> As after speciefying the sticky session, I am able to login to my
> application but if i do it more that 2-3 times...it doesn't redirect me to
> the application.
> 
> I get this eoor msg in tomcat logs:
> javax.faces.application.ViewExpiredException: viewId:/login.lahey - View
> /login.lahey could not be restored.
> 	at
> com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:206)
> 	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
> 	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:132)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
> 	at
> org.lahey.webapps.controller.ECMSFacesServlet.service(ECMSFacesServlet.java:47)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
> 	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
> 	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
> 	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
> 	at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
> 	at
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
> 	at java.lang.Thread.run(Thread.java:595)
> 

-- 
View this message in context: http://www.nabble.com/Apache-Http-sticky-session-problem.-tp18877839p18891955.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Http sticky session problem.

Posted by Rafael Genovez Idalgo <ra...@gmail.com>.
Hi. Here is your answer (I think hehe :-))

"workers.properties" of apache:
===
worker.list=bal1,stat1

worker.Tomcat61.type=ajp13
worker.Tomcat61.host=172.28.11.4
worker.Tomcat61.port=8009
worker.Tomcat61.lbfactor=10
worker.Tomcat61.connect_timeout=10000
worker.Tomcat61.prepost_timeout=10000
worker.Tomcat61.socket_timeout=10
worker.Tomcat61.connection_pool_timeout=30 # here in seconds <=> tomcat's
server.xml -> connectionTimeout=30000 ms

worker.Tomcat62.type=ajp13
worker.Tomcat62.host=172.28.11.4
worker.Tomcat62.port=8010
worker.Tomcat62.lbfactor=10
worker.Tomcat62.connect_timeout=10000
worker.Tomcat62.prepost_timeout=10000
worker.Tomcat62.socket_timeout=10
worker.Tomcat62.connection_pool_timeout=30 

worker.bal1.type=lb
worker.bal1.sticky_session=1
worker.bal1.balance_workers=Tomcat61,Tomcat62
worker.bal1.method=S # but already is the default...

worker.stat1.type=status
===

I hope this can help. By.
:-) Rafael.


amie.lahey wrote:
> 
> Hi All,
> 
> I need a urgent help with apache tomcat load balancing:
> I have configured Apache 2.2 with multiple tomcat 6 service instances to
> achieve load balancing. 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.
> 
> This how mow wrokers.properties look like:
> 
> ####Workers.Properties file####
> 
> 
> worker.list=bal1,stat1
> worker.Tomcat6_1.type=ajp13
> worker.Tomcat6_1.host=172.28.11.4
> worker.Tomcat6_1.port=8009
> worker.Tomcat6_1.sticky_session=True
> worker.Tomcat6_1.method=Session
> worker.Tomcat6_1.lbfactor=10
> worker.Tomcat6_2.type=ajp13
> worker.Tomcat6_2.host=172.28.11.4
> worker.Tomcat6_2.port=8010
> worker.Tomcat6_2.sticky_session=True
> worker.Tomcat6_1.method=Session
> worker.Tomcat6_2.lbfactor=10
> worker.bal1.type=lb
> worker.bal1.sticky_session=True
> worker.bal1.balance_workers=Tomcat6_1,Tomcat6_2
> worker.bal1.method=Session
> worker.stat1.type=status
> 
> I have specified the jvm route too in tomcat insatnces server.xml.
> 
> Can anyone help?
> As after speciefying the sticky session, I am able to login to my
> application but if i do it more that 2-3 times...it doesn't redirect me to
> the application.
> 
> I get this eoor msg in tomcat logs:
> javax.faces.application.ViewExpiredException: viewId:/login.lahey - View
> /login.lahey could not be restored.
> 	at
> com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:206)
> 	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
> 	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:132)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
> 	at
> org.lahey.webapps.controller.ECMSFacesServlet.service(ECMSFacesServlet.java:47)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
> 	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
> 	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
> 	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
> 	at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
> 	at
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
> 	at java.lang.Thread.run(Thread.java:595)
> 

-- 
View this message in context: http://www.nabble.com/Apache-Http-sticky-session-problem.-tp18877839p19743819.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Antwort: [users@httpd] Apache Http sticky session problem.

Posted by Rob Stewart <ro...@googlemail.com>.
Oops also forgot this snippet for context.xml of each Tomcat...

====Start snippet
<Context distributable="true">
====End snippet

-- 
Rob (rob.rstuff@googlemail.com)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Antwort: [users@httpd] Apache Http sticky session problem.

Posted by Rob Stewart <ro...@googlemail.com>.
Regarding the 'quotes' issue - I'll explain...

  In the server.xml file for the Tomcat server you name your jvm route
something like...

jvmRoute="tc1"

  And in my case, the Apache httpd.conf, you name the route like...

BalancerMember ajp://127.0.0.1:18009 route=tc1

  For a couple of days I had...

route="tc1"

  because I had copy/pasted the value from the XML! I understand that
this may not apply to you directly, but take note that in the usual
configuration files that are NOT XML they mostly do not require
quotes.

  Here's a snippet from my Apache httpd.conf file that show how I load
balanced my set-up. I needed only a specific sub-URL, hence the weird
ProxyPass, but it *should* work for other URL settings.

====Start Snippet

<Proxy balancer://mycluster>
# Does not seem to matter which one of these are used for the ajp path.
  BalancerMember ajp://127.0.0.1:18009 route=tc1
  BalancerMember ajp://127.0.0.1:28009 route=tc2
#  BalancerMember ajp://localhost:18009 route=tc1
#  BalancerMember ajp://localhost:28009 route=tc2
</Proxy>

# Using JSESSIONID or JSESSIONSSO for stickysession seems to make no difference.
ProxyPass /myServer   balancer://mycluster/myServer
stickysession=JSESSIONID lbmethod=bytraffic

<Location /balancer-manager>
  SetHandler balancer-manager

  Order Deny,Allow
  Deny from all
  Allow from 127.0.0.1
</Location>

====End snippet

Then my Tomcat1 server.xml (change ports etc for the 2nd Tomcat)
contains this (I've left some parts out)...

====Start snippet

  <Service name="Catalina">
    <Connector port="18080"
               redirectPort="18443"
               protocol="HTTP/1.1"
               connectionTimeout="20000" />

    <Connector port="18009"
               redirectPort="18443"
               protocol="AJP/1.3" />

    <Engine name="Catalina"
            defaultHost="localhost"
            jvmRoute="tc1">

      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" />

      <Host name="localhost"
            appBase="webapps"
            unpackWARs="true"
            autoDeploy="true"
            xmlValidation="false"
            xmlNamespaceAware="false">

<!--
  This is here so that all servlets under the host have single
sign on authentication.
 -->
          <Valve
className="org.apache.catalina.authenticator.SingleSignOn" debug="0"/>
      </Host>
    </Engine>
  </Service>

====End Snippet

  Again - This is how I did it using Apache 2.2 and Tomcat 6 - you're
set-up is different and this may not solve your problems. Just thought
it might help.

-- 
Rob (rob.rstuff@googlemail.com)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Antwort: [users@httpd] Apache Http sticky session problem.

Posted by Di...@eurotours.at.
Hello amie,

I don't know if you use mod_jk or mod_proxy_ajp.

I have only experience on mod_jk.

There must the name from the worker "exact" the same as the
value from the jvm route.

in your case the rout should look like

Tomcat6_1 at server 172.28.11.4 with ajp conn at:8009
and 
Tomcat6_2 at server 172.28.11.4 with ajp conn at:8010

regards Dietmar





"amie.lahey" <am...@lahey.org> 
07.08.2008 21:22
Bitte antworten an
users@httpd.apache.org


An
users@httpd.apache.org
Kopie

Thema
[users@httpd] Apache Http sticky session problem.






Hi All,

I need a urgent help with apache tomcat load balancing:
I have configured Apache 2.2 with multiple tomcat 6 service instances to
achieve load balancing. 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.

This how mow wrokers.properties look like:

####Workers.Properties file####


worker.list=bal1,stat1
worker.Tomcat6_1.type=ajp13
worker.Tomcat6_1.host=172.28.11.4
worker.Tomcat6_1.port=8009
worker.Tomcat6_1.sticky_session=True
worker.Tomcat6_1.method=Session
worker.Tomcat6_1.lbfactor=10
worker.Tomcat6_2.type=ajp13
worker.Tomcat6_2.host=172.28.11.4
worker.Tomcat6_2.port=8010
worker.Tomcat6_2.sticky_session=True
worker.Tomcat6_1.method=Session
worker.Tomcat6_2.lbfactor=10
worker.bal1.type=lb
worker.bal1.sticky_session=True
worker.bal1.balance_workers=Tomcat6_1,Tomcat6_2
worker.bal1.method=Session
worker.stat1.type=status

I have specified the jvm route too in tomcat insatnces server.xml.

Can anyone help?
As after speciefying the sticky session, I am able to login to my
application but if i do it more that 2-3 times...it doesn't redirect me to
the application.
--
View this message in context: 
http://www.nabble.com/Apache-Http-sticky-session-problem.-tp18877839p18877839.html

Sent from the Apache HTTP Server - Users mailing list archive at 
Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
"   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org