Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 27761DF0D for ; Sun, 2 Sep 2012 13:33:22 +0000 (UTC) Received: (qmail 70909 invoked by uid 500); 2 Sep 2012 13:33:21 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 70752 invoked by uid 500); 2 Sep 2012 13:33:20 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 70740 invoked by uid 99); 2 Sep 2012 13:33:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Sep 2012 13:33:20 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ravi.chamarthy@in.ibm.com designates 122.248.162.4 as permitted sender) Received: from [122.248.162.4] (HELO e28smtp04.in.ibm.com) (122.248.162.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Sep 2012 13:33:09 +0000 Received: from /spool/local by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 2 Sep 2012 19:02:47 +0530 Received: from d28relay03.in.ibm.com (9.184.220.60) by e28smtp04.in.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 2 Sep 2012 19:02:45 +0530 Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q82DWjG736765808 for ; Sun, 2 Sep 2012 19:02:45 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q82DWi8r018536 for ; Sun, 2 Sep 2012 23:32:45 +1000 Received: from d23ml066.in.ibm.com (d23ml066.in.ibm.com [9.182.8.73]) by d28av04.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q82DWiSv018533 for ; Sun, 2 Sep 2012 23:32:44 +1000 In-Reply-To: <1346154040.2479.5.camel@ubuntu> References: <1346154040.2479.5.camel@ubuntu> Subject: Re: Randon "ProtocolException: The server failed to respond with a valid HTTP response" while executing the client request X-KeepSent: DB00A7C8:C1F70FEE-65257A6D:004A45ED; type=4; name=$KeepSent To: "HttpClient User Discussion" X-Mailer: Lotus Notes Release 8.5.3 September 15, 2011 Message-ID: From: Ravi C Chamarthy Date: Sun, 2 Sep 2012 19:01:54 +0530 X-MIMETrack: Serialize by Router on d23ml066/23/M/IBM(Release 8.5.3HF266 | January 13, 2012) at 02/09/2012 19:01:56 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII x-cbid: 12090213-5564-0000-0000-0000044ABE4B Hi Oleg, Thanks for your response ! I tried to capture the request/response using an HTTP Analyzer tool. In the response of the prior (in the one before this failed http request) http call, I see the Connection header attribute value set to 'close'. However, we indeed have the following explicit call to check stale connections, but still is is failing with a blank response. HttpConnectionParams.setStaleCheckingEnabled(params, true);
POST /ibm/iis/isf/javahttp/checked/com.ibm.iis.isf.security.auth.AuthenticationService/login HTTP/1.1
Content-Length: 1048
Content-Type: application/octet-stream
Host: hyddev15:80
Connection: Keep-Alive
User-Agent: Apache-HttpClient/IIS 4.2 (java 1.5)
Cookie: JSESSIONID=0000titWHhRyPYrO6sWcA0LST3C:-1
Cookie2: $Version=1
Authorization: Basic YXV0aF91c2VyXzI0NkZUT18wOmF1dGhfdXNlcl8yNDZGVE9fMA==
HTTP/1.1 200 OK
X-Powered-By: Servlet/3.0
Content-Type: application/octet-stream
Content-Language: en-US
Set-Cookie: LtpaToken2=JAAuivq99D +v6sR6rfq7FlVsFPnHoMwp1hTG9Pd5FPPA7gVEzGcC4lyZaLdVrQtYIy09yVVvIScN110DpQaHOi5BLMBzGdJZZw/1a5qd +C7nKbfjWgUQCK6ZVbACSzHsgGdcn0trVobZ/Sl3WxiDL4kys +cvWzTB/AmZMgarNM70tEnoav51Y1t4JCBqDq5d1K1YnFs56E6W7gJSXnOQClEqRahUW7jgvKvvHppbECMo72rDA9ftVl/d3nwrKMVXF7GxXa0w5pFMCPf +r4kxYPFd3sWd0shmaK2Tepe0fX05W0O93dm8/ylkdHbP02eaiMmP +uLnOCCX4cHK4v7lzT0HFWdwBPvDcjgUR7HqXiakv/V0lbocsp2P/mGoL +bwJ4j8QJSmrTI/b7MbOPIJnF9zT5/TMgASyHLKdgItNIQZB3LRP6vN4Y0YuTuD5UOLoyqYfaZHlocZBVpWSTXE8N73h4880DWKwTpleGr0WMBZRQw/39EIQu29 +MYc4qNt2ySAXp85P8G3rdzg +wNQJtZXD25cVYXWmtx4r5ouOu7bLbKPkON8p/jwcnk9uOtXE3bAPO1gv18LYBGBQjxBgJKN8hPR0b41/lhRjzZL86QqodHYrSURvSAgB +S3ynNfAfj/h5Rf6pjJyACpQKeNoWFaAJ0JmEzBK1qGlc+Ne9Q=; Path=/; HttpOnly
Set-Cookie: X-IBM-IISSessionId=oT9YXn09/H6fquWop8A6K9VFnXL/ZSfAHRBOb5V3MqZZArOL4rErcXklDC2ToSiWWRHfSkSDNm3oNOgHu20CoDLTipBXDTrAL6n05kwpQy0jbcvMQtglMgtAXLpD +LqbJ1zDQPYe8UKSC4HuNSdOHc9t3oMrGksIQRtDHkwmuHQ=; Path=/; HttpOnly
Transfer-Encoding: chunked
Connection: Close
Date: Sun, 02 Sep 2012 09:59:30 GMT
Server: WebSphere Application Server/8.0
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Cache-Control: no-cache="set-cookie, set-cookie2"
Thanks, Ravi Chamarthy IBM Information Platform & Solutions IBM Software Group ravi.chamarthy@in.ibm.com From: Oleg Kalnichevski To: httpclient-users@hc.apache.org, Date: 08/28/2012 05:10 PM Subject: Re: Randon "ProtocolException: The server failed to respond with a valid HTTP response" while executing the client request On Tue, 2012-08-28 at 12:00 +0530, Ravi C Chamarthy wrote: > Hi, > > I am running a junit test case, where the test methods would submit http > client requests to the target application server (WebSphere 8) which hosts > the serving application. > While running the test case, I randomly run into the following error, where > in first run, say testA() would fail, and in a successive test run testA () > would pass but some other test method, say testB() would fail with the same > error message as listed below. > I am not sure what is happening as it not a constant error occurring for > the same method. > What's more confusing is, the Servlet listening to the HTTP requests is not > at all called when this error occurred. And also, I do not see any error > messages at the server side. > This exception is thrown when the server simply drops the connection in the middle of HTTP exchange without responding in any meaningful way. Quite often that can happen when the server is unable to accept new incoming connections due to overload or an internal problem of some sort. The servlet never gets called because the connection gets dropped by WebSphere's HTTP stack before control is passed to your web application. Oleg PS: Please do _not_ cross post. --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org