Intermittent 400 error code -client sent invalid method while reading client request line,

Maxim Dounin mdounin at mdounin.ru
Wed Jun 27 07:49:59 UTC 2012


Hello!

On Tue, Jun 26, 2012 at 11:38:11PM -0400, paphillon wrote:

> In our setup we have a client that makes some web services calls to the
> back end with nginx as a proxy in between.
> 
> Most of the time it is successful 99%  but 1% calls are dropped and the
> client reports the error. On retry the operation goes through fine, no
> other change is requried.
> 
> The client is on a hosted environment, so getting detailed logs from
> client is bit hard.
> 
> (Client Error) --- Error: unable to send request to :
> https://proxt.nginx.host.url. Server response:
> System.HttpResponse[Status=null, StatusCode=-1]
> 
> Nginx captures the below in the default server error log. Interestingly
> no access / error log is written for the virtual host that is suppose to
> handle the request.

As request is invalid and there is no Host header, it's not 
possible to match virtual host.  So no surpirse here.

> 2012/06/26 20:22:55 [debug] 32536#0: *305 http check ssl handshake
> 2012/06/26 20:22:55 [debug] 32536#0: *305 https ssl handshake: 0x16
> 2012/06/26 20:22:55 [debug] 32536#0: *305 http process request line
> 2012/06/26 20:22:55 [debug] 32536#0: *305 http process request line
> 2012/06/26 20:22:55 [info] 32536#0: *305 client sent invalid method
> while reading client request line, client: 96.43.x.x, server: , request:
> "User-Agent: Java/1.6.0_21"

It looks like client indeed failed to produce correct request, 
"User-Agent: Java/1.6.0_21" doesn't looks like valid one.

[...]

Maxim Dounin



More information about the nginx mailing list