You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Kristian Rink <ka...@gmail.com> on 2014/11/26 10:22:06 UTC

[users@httpd] mod_proxy / ProxyPass: 400 Bad Request?

Folks;

trying to track down a strange error, I am ending up here. Situation: We 
run a web application built on top of Java and Jetty exposed through an 
apache2 + mod_proxy reverse proxy.

Generally, this works fine. However, some of our users experience 
troubles doing file uploads this way. In those situations, in example 
while using an upload Java applet such as JUpload, there are three 
things to be seen:

- the upload component on the Java server complains about an EOF / empty 
request and guesses the client stopped sending data,

- the user client stops upload after throwing a SocketException - 
"connection reset by peer",

- on the mod_proxy machine, I see the request in the log files obviously 
returning a 400 Bad Request:

xx.x.xx.xx - - [26/Nov/2014:09:24:51 +0100] "POST 
/webprojekt/tasks/upload HTTP/1.1" 400 4533 ....

... but why? So far I have been playing with configuration options on 
both sides (apache2 ProxyPass parameters, configuration options in the 
Jetty running the backend applications) but didn't really manage to get 
these things resolved. So, two questions:

- Is there any way to make apache2 / mod_proxy provide more logging 
output in these situations? I'd not just like to know that it actually 
does return a 400, I'd also like to know _why_ it does so. This would be 
of great help but I fail to see how to set a log level to debug just for 
mod_proxy.

- In case someone has experience with mod_proxy: What could probably 
cause a 400 in such a setup? Temporary connection issues? Resource 
limitations in the backend? Client stuff?

TIA and all the best,
Kristian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy / ProxyPass: 400 Bad Request? (UNCLASSIFIED)

Posted by Igor Cicimov <ic...@gmail.com>.
On 27/11/2014 1:25 AM, "Kristian Rink" <ka...@gmail.com> wrote:
>
> Am 26.11.2014 um 15:19 schrieb Stefan Magnus Landrø:
>
>> Check user-agent header too. Mobile phones might just be too slow or get
disconnected
>
>
> Did that already, but wasn't able to find a pattern here. Most of the
clients using our system use some desktop browser to upload larger files or
collections of files, but these issues don't seem specific to a particular
user agent (had severe trouble with earlier MSIE versions, that's why this
was my first thought too)...
>
Any firewall infront the proxy? Are all the timeouts in sync along the
stack?

Re: [users@httpd] mod_proxy / ProxyPass: 400 Bad Request? (UNCLASSIFIED)

Posted by Kristian Rink <ka...@gmail.com>.
Am 26.11.2014 um 15:19 schrieb Stefan Magnus Landrø:
> Check user-agent header too. Mobile phones might just be too slow or get disconnected

Did that already, but wasn't able to find a pattern here. Most of the 
clients using our system use some desktop browser to upload larger files 
or collections of files, but these issues don't seem specific to a 
particular user agent (had severe trouble with earlier MSIE versions, 
that's why this was my first thought too)...

Kristian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy / ProxyPass: 400 Bad Request? (UNCLASSIFIED)

Posted by Stefan Magnus Landrø <st...@gmail.com>.
Check user-agent header too. Mobile phones might just be too slow or get disconnected 

Sendt fra min iPhone

> Den 26. nov. 2014 kl. 15.11 skrev Kristian Rink <ka...@gmail.com>:
> 
>> Am 26.11.2014 um 14:48 schrieb Stefan Magnus Landrø:
>> I'd add response time logging %D to the access log config to see if requests are slow
>> 
>> You can add that to jetty too.
> 
> I'll give it a try and see where it gets me - thanks for the hint!
> Kristian
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy / ProxyPass: 400 Bad Request? (UNCLASSIFIED)

Posted by Kristian Rink <ka...@gmail.com>.
Am 26.11.2014 um 14:48 schrieb Stefan Magnus Landrø:
> I'd add response time logging %D to the access log config to see if requests are slow
>
> You can add that to jetty too.

I'll give it a try and see where it gets me - thanks for the hint!
Kristian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy / ProxyPass: 400 Bad Request? (UNCLASSIFIED)

Posted by Stefan Magnus Landrø <st...@gmail.com>.
I'd add response time logging %D to the access log config to see if requests are slow 

You can add that to jetty too. 

Stefan

Sendt fra min iPhone

> Den 26. nov. 2014 kl. 14.34 skrev Kristian Rink <ka...@gmail.com>:
> 
> Hi Nick;
> 
> thanks for your comment.
> 
>> Am 26.11.2014 um 14:11 schrieb Folino, Nick E CTR USARMY HRC (US):
>> 
>> You may need to enable chunked encoding for those locations.
>> 
>> <Location /uploads>
>>     SetEnv proxy-sendchunked
>> </Location>
> 
> As far as I see in our configuration, chunked encoding is already globally enabled. I remember one of our admins enabled this a while ago in order to work around another issue I can't remember well right now... ;)
> 
> Thanks and all the best,
> Kristian
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy / ProxyPass: 400 Bad Request? (UNCLASSIFIED)

Posted by Kristian Rink <ka...@gmail.com>.
Hi Nick;

thanks for your comment.

Am 26.11.2014 um 14:11 schrieb Folino, Nick E CTR USARMY HRC (US):
>
> You may need to enable chunked encoding for those locations.
>
> <Location /uploads>
>      SetEnv proxy-sendchunked
> </Location>

As far as I see in our configuration, chunked encoding is already 
globally enabled. I remember one of our admins enabled this a while ago 
in order to work around another issue I can't remember well right now... ;)

Thanks and all the best,
Kristian


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] mod_proxy / ProxyPass: 400 Bad Request? (UNCLASSIFIED)

Posted by "Folino, Nick E CTR USARMY HRC (US)" <ni...@mail.mil>.
Classification: UNCLASSIFIED
Caveats: FOUO

You may need to enable chunked encoding for those locations.

<Location /uploads>
    SetEnv proxy-sendchunked
</Location>

Nick

-----Original Message-----
From: Kristian Rink [mailto:kawazu428@gmail.com] 
Sent: Wednesday, November 26, 2014 4:22 AM
To: users@httpd.apache.org
Subject: [users@httpd] mod_proxy / ProxyPass: 400 Bad Request?

Folks;

trying to track down a strange error, I am ending up here. Situation: We run a web application built on top of Java and Jetty exposed through an
apache2 + mod_proxy reverse proxy.

Generally, this works fine. However, some of our users experience troubles doing file uploads this way. In those situations, in example while using an upload Java applet such as JUpload, there are three things to be seen:

- the upload component on the Java server complains about an EOF / empty request and guesses the client stopped sending data,

- the user client stops upload after throwing a SocketException - "connection reset by peer",

- on the mod_proxy machine, I see the request in the log files obviously returning a 400 Bad Request:

xx.x.xx.xx - - [26/Nov/2014:09:24:51 +0100] "POST /webprojekt/tasks/upload HTTP/1.1" 400 4533 ....

... but why? So far I have been playing with configuration options on both sides (apache2 ProxyPass parameters, configuration options in the Jetty running the backend applications) but didn't really manage to get these things resolved. So, two questions:

- Is there any way to make apache2 / mod_proxy provide more logging output in these situations? I'd not just like to know that it actually does return a 400, I'd also like to know _why_ it does so. This would be of great help but I fail to see how to set a log level to debug just for mod_proxy.

- In case someone has experience with mod_proxy: What could probably cause a 400 in such a setup? Temporary connection issues? Resource limitations in the backend? Client stuff?

TIA and all the best,
Kristian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Classification: UNCLASSIFIED
Caveats: FOUO