Ok - noted. I changed it. It works without the domain as you noted. Thanks.

Rainer Jung wrote:
That should not work!

The correct way to configure session stickyness is to use jvmRoute (which
you already did) and then giving the workers the same names as the
jvmRoute. That is instead of "bl_worker_dev" use "dev_alexis" and instead
of "bl_worker_noah" use "noah_alexis" as the worker names.

You should check, that the URLs produced by your application include the
";jsessionid=<32Characters>.<jvmRoute>" or - in case you use cookies - the
same info is in your session cookie.

mod_jk then automatically strips the <jvmRoute> part from the session
identifier and lloks for a worker of the same name.

You will only need to use the domain attribute in case you have a lot of
tomcat instances and some of them have the sessions replicated, others
not. Then you can give all members of a replication domain the same domain
name and mod_jk will know, that in case the correct worker is down, which
alternatives are good.


Beautiful - worked like a charm. That might take the cake as far as
longest question to quickest, shortest answer goes. ha. Thanks a bunch.

I might have to gripe about doucmentation in a second (nother thread)..

Noah


Edgar Alves wrote:

Try adding these two lines to worker.properties:
worker.bl_worker_dev.domain=dev_alexis
worker.bl_worker_noah.domain=noah_alexis

-- Edgar Alves

Mott Leroy wrote:



Hi -

I'm unable to get mod_jk load balancing working. The usual mod_jk
setup works just fine, but using a load balancing worker however, is
not. [Oddly, my webserver crashed during testing of this, but that
could very well be unrelated]

The problem is with user sessions. The instances (nodes) do not seem
to recognize an already established session with the user and are
creating new sessions. It's possible that is a "session-stickiness"
issue, but it appears like the requests are hitting the same instance,
just not getting the previously established session. As a result, I
can't even reliably login to my application.

I created a session listener for debugging purposes and it reports
-no- destroyed sessions, but plenty of newly created sessions on both
instances that make up the "cluster". The session IDs, I noticed, have
the jvmRoute name attached to them, which should be a good sign.

I have a webserver running Apache (1.3.33), mod_jk (1.2.14), and an
application server running the "cluster" -- 2 instances tomcat
(5.0.28) on different ports.

I added a unique jvmRoute to both instances in the server.xml:
<Engine name="Catalina" defaultHost="localhost" jvmRoute="dev_alexis">
<Engine name="Catalina" defaultHost="localhost" jvmRoute="noah_alexis">

My worker.properties loadbalancer settings:

worker.list=load_balancer_test

worker.load_balancer_test.type=lb
worker.load_balancer_test.balance_workers=bl_worker_dev,bl_worker_noah
worker.load_balancer_test.sticky_session=true
worker.load_balancer_test.sticky_session_force=false

worker.bl_worker_dev.type=ajp13
worker.bl_worker_dev.host=alexis
worker.bl_worker_dev.port=9003
worker.bl_worker_dev.lbfactor=1
worker.bl_worker_dev.socket_keepalive=1
worker.bl_worker_dev.recycle_timeout=300

worker.bl_worker_noah.type=ajp13
worker.bl_worker_noah.host=alexis
worker.bl_worker_noah.port=8063
worker.bl_worker_noah.lbfactor=3
worker.bl_worker_noah.socket_keepalive=1
worker.bl_worker_noah.recycle_timeout=300

Any ideas, things I could try would be much appreciated.

---------------------------------------------------------------------
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]





---------------------------------------------------------------------
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]

Reply via email to