Le samedi 31 octobre 2009 00:28:18, Robinson, Michael a écrit :
> Willy,
> 
> Before trying the workaround, I did use mod_write on Apache in front of 
> HAproxy to change "/app;jsessionid=..." into "/app;JSESSIONID=..."  HAproxy 
> log showed the modified request correctly matched expectations, such that the 
> incoming URL-based cookie name was uppercase JSESSIONID, the outgoing 
> header-based cookie name was also JSESSIONID (and their values matched).  
> Unfortunately, this did not work - could be some other config item I have set 
> incorrectly or possibly some unintended consequence of the rewrite.  

Well, Willy is right, you should put "appsession JSESSIONID" instead of 
"appsession jsessionid". Here, your tried to change the client side parameter 
but, as he said, the problem is on the response side, where the cookie sent is 
JSESSIONID which doesn't match the rule "appsession jsessionid" (the cookie is 
case sensitive, the url parameter not).

I quote here some parts of your previous messages :
> I'm curious about jvmRoute - should I have it set in the tomcat configuration 
> (and, if so, to what)?  Since HAproxy is doing the routing of requests, by 
> the time it hits the frontend there is no more routing required so I don't 
> have jvmRoute set... perhaps this is incorrect?  It does appear my request 
> contains mod_jk-like appended server info to the jsessionid
>
> "POST /app;jsessionid=813FD588059604BD3D519A11A0C1FA7B.10.250.54.70 HTTP/1.0"

You said that the jvmRoute was not set but this "mod_jk-like appended server" 
is certainly the jvmRoute configured in the tomcat engine section (see 
server.xml). As there's no loadbalancing between apache and tomcat, I think 
this is not useful and can be removed. Also, haproxy can skip this suffix and 
take into account only the first 32 chars (this will use less memory in the 
haproxy persistence table).

"appsession JSESSIONID len 32 timeout 1h" should work.

I hope that helps you.

-- 
Cyril Bonté

Reply via email to