You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ruslan Gainutdinov <ru...@gmail.com> on 2012/06/09 09:24:54 UTC

Connectors: Using JK_ROUTE env var with disabled worker in load balancer

Hello!

I am trying to use JK_ROUTE to forward all traffic to some worker which are
disabled.
Disabled workers does not allow new sessions, but I think if I set it
explicitly,
it should be used?

SetEnvIf Remote_Addr 10\.0\.0\.1 JK_ROUTE=SERVER-5

However, then 10.0.0.1 accesses LB applcation,
it changes worker name in JSESSIONID cookie, but not to SERVER-5 but to
some random one (1-4).

Is this behaviour expected? How can I isolate one worker to serve requests
only from one user,
but not used to serve requests from others?

-- Good bye and good luck

Re: Connectors: Using JK_ROUTE env var with disabled worker in load balancer

Posted by Rainer Jung <ra...@kippdata.de>.
On 09.06.2012 09:24, Ruslan Gainutdinov wrote:
> Hello!
>
> I am trying to use JK_ROUTE to forward all traffic to some worker which are
> disabled.
> Disabled workers does not allow new sessions, but I think if I set it
> explicitly,
> it should be used?
>
> SetEnvIf Remote_Addr 10\.0\.0\.1 JK_ROUTE=SERVER-5
>
> However, then 10.0.0.1 accesses LB applcation,
> it changes worker name in JSESSIONID cookie, but not to SERVER-5 but to
> some random one (1-4).
>
> Is this behaviour expected? How can I isolate one worker to serve requests
> only from one user,
> but not used to serve requests from others?

- which version of mod_jk are you using?
- are the workers named SERVER-(1-5) members of a load balancer worker?
- What is your test URL?
- is this URL mapped to the load balancer worker via JkMount or similar?
- is the worker SERVER-5 not in error state (check mod_jk logs and 
jk-status)?
- did you make sure, that the request does not contain a JSESSIONID 
(cookie or URL encoded) which conflicts with the JK_ROUTE?

- Add %{Cookies}i, %{Set-Cookie}o and %{JK_ROUTE}e to your Apache 
LogFormat and check whether the values are as expected.

Finally: it would be easier to simply request

/my/test/url;jsessionid=.SERVER-5

which should do the same trick.

Regards,

Rainer

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