Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 75588 invoked from network); 27 Dec 2010 21:37:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Dec 2010 21:37:13 -0000 Received: (qmail 12585 invoked by uid 500); 27 Dec 2010 21:37:11 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 12512 invoked by uid 500); 27 Dec 2010 21:37:11 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 12455 invoked by uid 99); 27 Dec 2010 21:37:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Dec 2010 21:37:11 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [194.109.157.34] (HELO servers.realworks.nl) (194.109.157.34) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Dec 2010 21:37:03 +0000 Received: from localhost (localhost [127.0.0.1]) by rwlinux40.colo.realworks.nl (Postfix) with ESMTP id 7D780C4345 for ; Mon, 27 Dec 2010 22:36:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at rwlinux40.colo.realworks.nl Received: from servers.realworks.nl ([127.0.0.1]) by localhost (rwlinux40.colo.realworks.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uMngmkO9spso for ; Mon, 27 Dec 2010 22:36:43 +0100 (CET) Received: from rwlinux75.colo.realworks.nl (rwlinux75.colo.realworks.nl [10.0.10.125]) by rwlinux40.colo.realworks.nl (Postfix) with ESMTP id 5A7CBC433E for ; Mon, 27 Dec 2010 22:36:43 +0100 (CET) Received: from rwlinux75.colo.realworks.nl (localhost [127.0.0.1]) by rwlinux75.colo.realworks.nl (Postfix) with ESMTP id 58116C055 for ; Mon, 27 Dec 2010 22:36:43 +0100 (CET) Date: Mon, 27 Dec 2010 22:36:43 +0100 (CET) From: Ronald Klop To: Tomcat Users List Message-ID: <818926638.1178.1293485803341.JavaMail.tomcat@localhost> In-Reply-To: References: Subject: Re: Http11NioProtocol error 505 (or 400) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1177_928040109.1293485803337" X-Mailer: Realworks (2.9.0-CRM-2-121208) X-Originating-Host: from (d23080.upc-d.chello.nl [213.46.23.80]) by rwlinux75 [10.0.10.125] with HTTP (Apache Tomcat/6.0.29); Mon, 27 Dec 2010 22:36:43 +0100 X-Priority: 3 (Normal) Importance: Normal X-Originating-User-Agent: Opera/9.80 (Windows NT 6.1; U; nl) Presto/2.7.62 Version/11.00 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_1177_928040109.1293485803337 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 : > > 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: > > maxThreads="256" minSpareThreads="32"/> > 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 > > > > ------=_Part_1177_928040109.1293485803337--