简体   繁体   中英

Apache load balancer dropping the HTTP request body

I have configured an Apache http server with mod_proxy to load balance between two jetty servers (sticky sessions).

Everything works fine and as expected while the two servers are up and running. But if I get one of the servers down and then attempt to make an http post to that server, the Apache balancer redirects the post to the running server but with an empty body, losing the original request.

After the request that triggered the redirect to the running server, all subsequent requests work fine.

Apache configuration:

<Proxy balancer://cluster>
  BalancerMember http://localhost:9090 route=node1
  BalancerMember http://localhost:9091 route=node2
  ProxySet stickysession=JSESSIONID
</Proxy>

ProxyPreserveHost On
ProxyPass "/" "balancer://cluster/" 
ProxyPassReverse "/" "balancer://cluster/"

I'm using Apache Server 2.4 and Jetty 9.4.22

Any ideas on why this is happening?

Thanks.

It looks like you hit the bug introduced as a regression in 2.4.41. You can check out the details here: https://bz.apache.org/bugzilla/show_bug.cgi?id=63891

To remedy, you will need to upgrade to 2.4.42 or greater.

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