Score:0

POST requests fail after updating Apache load balancer ("empty stream")

tf flag

We have an apache configured as a load balancer (mod_proxy_balancer afaik) distributing the load to several wildfly application nodes. This was working fine until we updated the operating system from debian buster to bullseye.

The OS update increased the apache version from 2.4.38 -> 2.4.51 (plus some debian changes I guess). Since then all HTTP POST requests fail with an "input stream is empty" error message as if the body of that request is somehow swallowed on the way.

I didn't find anything related on the net - so does anbody know whats going on?

Is there some option for this? I browsed the change log but could not find anything related...

We tried several different ReST Clients however all result in the same error.

Score:0
tf flag

I could track down the problem. Somebody was checking the InputStream with

if(inputstream.available() < 1){
  throw new SomeException("input stream is empty");
}

But of course everybody who knows the InputStream.available() method knows that it is unreliable(1,2,3,4,...). Problem solved.

I mean something must have changed from apache 2.4.38 -> 2.4.51 since reading from the request body now seems slower than before...

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.