简体   繁体   中英

Apache load balancing with tomcat : losing session

I am using proxy pass to load balance my workers. Somehow my tomcat session is getting lost and recreated. I tried standalone tomcat and it works fine but not with load balancer. Please help.

  <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /balancer-manager ! ProxyPass /images ! ProxyPass / balancer://mycluster/ ProxyPassReverse / balancer://mycluster/ <Proxy balancer://mycluster> BalancerMember ajp://192.168.70.6:9061 route=qa1 ProxySet lbmethod=byrequests </Proxy> <Location /balancer-manager> SetHandler balancer-manager </Location> <Directory "/Library/WebServer/Documents"> AllowOverride all </Directory> 

I finally figured out the cause of the issue. I had another server which was being invoked by an absolute URL from the site which was causing the workers JSESSIONID to be overwritten.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM