Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 288
diego_silva Avatar asked Oct 18 '25 12:10

diego_silva


1 Answers

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.

like image 63
Christopher Avatar answered Oct 21 '25 10:10

Christopher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!