[Bug 64051] mod_jk set_session_cookie not sending new cookie after node failover for sticky session

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Bug 64051] mod_jk set_session_cookie not sending new cookie after node failover for sticky session

Bugzilla from bugzilla@apache.org

Christopher Schultz <[hidden email]> changed:

           What    |Removed                     |Added
             Status|NEW                         |NEEDINFO

--- Comment #10 from Christopher Schultz <[hidden email]> ---
(In reply to Mohsen from comment #7)

> worker.node1.sticky_session=1

This is not a valid configuration directive for a node. Only for a
load-balancer worker. It's not harmful to have it here, though.

> worker.balancer.sticky_session=1

Note that sticky_session=true is the default. I'm not sure what happens if you
use the value "1" instead of "true". Consider changing it to "true" to match
the documentation.

> worker.balancer.method=B
> worker.balancer.session_cookie=AWN
> worker.balancer.set_session_cookie=true
> worker.balancer.session_cookie_path=/myapp/

Are you sure you need set_session_cookie=true and the associated directives? Is
"/myapp/" your actual application's context-path, or is that just removeing
private information from your config?

> I added dummy worker because at least should exists 2 workers to get new
> session cookie when I remove node1 or node2. So when I remove node1 the
> config would change to this:
> worker.dummy.activation=A
> worker.balancer.balance_workers=dummy,node2

You should set the activation of "dummy" to "D" (disabled) and use the
"redirect" directive from other nodes to configure a hot-standby. If you
re-configure mod_jk e.g. by performing "apachectl graceful" then you may lose a
lot of metrics that mod_jk has been storing about its connections. It's better
to configure it to automatically fail-over.

> I wrote some bash scripts to do all of these steps automatically. So when I
> want to update node1 I remove it from workers, add stopped dummy to workers
> and update the node1 and do the same for ndoe2 and after all updated I
> remove dummy from workers and everything goes well.

Okay. This is to simulate planned downtime for a node?

> This is my server.xml in tomcat also:
> <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"

No, it's not. You are using mod_jk, so you'll need to be using one of the AJP
protocol connectors.

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

Good: you have a jvmRoute set. Although with set_sticky_session=true with a
separate cookie, this doesn't do anything.

Can you also please post your JkMount directives?

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]