tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronald Klop <ronald-mailingl...@base.nl>
Subject Re: Http11NioProtocol error 505 (or 400)
Date Mon, 27 Dec 2010 21:36:43 GMT

I see similar errors. If it is the same there should be a fix in Tomcat 7.0.4 and 6.0.30 (not
released yet)

Something like this?
https://issues.apache.org/bugzilla/show_bug.cgi?id=50072

Ronald.


Op maandag, 27 december 2010 18:59 schreef Olaf Tomczak <olaf.tomczak@gmail.com>:
> 
> Hi,
> 
> I'm using Http11NioProtocol connector on my Tomcat 6.0.29 instance and I
> noticed that sometimes I experience strange responses:
> - 400 - Bad Request,
> - 505 - HTTP Version Not Supported
> 
> My first conclusion was that it's somewhat related to the size of the
> request (e.g. clearing session cookies always fixed the problem). I then
> recompiled Tomcat from sources adding some additional logs
> to Http11NioProcessor and InternalNioInputBuffer classes. I also isolated a
> test request that always fails on my test server instace and used it as a
> JMeter test configuration.
> 
> I'm using the following connector configuration:
> 
> <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
> maxThreads="256" minSpareThreads="32"/>
> <Connector executor="tomcatThreadPool"
>         acceptorThreadCount="4"
>         useComet="false"
>         address="0.0.0.0"
>         port="4080"
>         protocol="org.apache.coyote.http11.Http11NioProtocol"
>         connectionTimeout="30000"
>         redirectPort="4443"
>         enableLookups="false"
>         />
> 
> Looking at my logs I found out that the request fails with the following
> scenario:
> 
> InternalNioInputBuffer.parseRequestLine - successfully parses the first
> request line
> InternalNioInputBuffer.parseHeader - parses some headers but then fails to
> read more data and returns with HeaderParseStatus.NEED_MORE_DATA status
> InternalNioInputBuffer.parseRequestLine - is called again and then tries to
> parse the remaining headers and fails with 505 since it takes a part of
> 'User-Agent' header value as a protocol name.
> 
> Can someone familiar with the Http11NioProtocol connector help me with this
> problem?
> 
> I also noticed that when a use a local instance of Tomcat (on the same host
> as my jmeter) with the same configuration the requests work (I suppose it's
> because the connection is faster and more data is available in the buffer
> without delay).
> 
> Thanks a lot,
> Olaf Tomczak
>  
> 
> 
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message