Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 14978 invoked from network); 12 May 2004 17:29:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 May 2004 17:29:52 -0000 Received: (qmail 96411 invoked by uid 500); 12 May 2004 17:30:09 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 96340 invoked by uid 500); 12 May 2004 17:30:08 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 96282 invoked by uid 98); 12 May 2004 17:30:07 -0000 Received: from mike@michaelmcgrady.com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(208.186.46.9):. Processed in 1.492155 secs); 12 May 2004 17:30:07 -0000 X-Qmail-Scanner-Mail-From: mike@michaelmcgrady.com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(208.186.46.9):. Processed in 1.492155 secs) Received: from unknown (HELO list-svr.nventure.com) (208.186.46.9) by hermes.apache.org with SMTP; 12 May 2004 17:30:06 -0000 Received: from HomeSites.michaelmcgrady.com ([131.191.40.91]) by list-svr.nventure.com (Post.Office MTA v3.5.3 release 223 ID# 0-67609U1600L200S0V35) with ESMTP id com; Wed, 12 May 2004 10:33:33 -0700 Message-Id: <6.1.0.6.0.20040512102842.019d42e8@mail.michaelmcgrady.com> X-Sender: mike@michaelmcgrady.com@mail.michaelmcgrady.com X-Mailer: QUALCOMM Windows Eudora Version 6.1.0.6 Date: Wed, 12 May 2004 10:29:06 -0700 To: "Commons HttpClient Project" From: Michael McGrady Subject: Re: 'Socket closed' exception using Cc: , "Preygel, Sofya" In-Reply-To: <25D454F3DBD1AF46A718F761CB11ABE11D0A50@nycmrmt1.corp.pbwan .net> References: <25D454F3DBD1AF46A718F761CB11ABE11D0A50@nycmrmt1.corp.pbwan.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====================_101944698==.ALT" X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --=====================_101944698==.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed How are you setting your headers? That is sometimes the issue on socket closings. At 10:25 AM 5/12/2004, Preygel, Sofya wrote: >Hello, > >We are trying to use HTTPClient.execute(PostMethod) for sending SOAP >requests to Connotate's Web Mining Server (WMS). The requests are sent >every 1 minute, and in most cases everything works fine. However, every >so often (sometimes way too often!) we are getting the 'Socket closed' >exception. The socket timeout was initially set to 10 seconds (10000 >millis), but even after I set it to 120 seconds (120000 millis), we are >still seeing it happening quite often. I tried to use both the >getResponseBodyAsString() and getResponseBodyAsStream() to retrieve the >response, but it does not change anything. > >The application is running on Windows 2000 (SP4). I tried both the >HTTPClient v2.0 (final) and the latest night build (as of yesterday), >but the results are the same. We are using HTTP 1.0 >(PostMethod.setHttp11(false)), with the application running on the same >computer as the WMS. > >I will appreciate any suggestions about what can be done here. > >Thank you, >Sofya > >Stack trace: >08:54:37 DEBUG [Thread-19] - enter PostMethod.renerateRequestBody() >08:54:37 DEBUG [Thread-19] - enter >EntityEnclosingMethod.renerateRequestBody() >08:54:37 DEBUG [Thread-19] - enter getContentCharSet( Header >contentheader ) >08:54:37 DEBUG [Thread-19] - enter HeaderElement.parse(String) >08:54:37 DEBUG [Thread-19] - enter HeaderElement.parsePair(char[], int, >int) >08:54:37 DEBUG [Thread-19] - enter HeaderElement.parsePair(char[], int, >int) >08:54:37 DEBUG [Thread-19] - Using buffered request body >08:54:37 DEBUG [Thread-19] - enter >HttpConnection.getRequestOutputStream() >08:54:37 DEBUG [Thread-19] - Request body sent >08:54:37 DEBUG [Thread-19] - enter >HttpConnection.flushRequestOutputStream() >08:54:37 DEBUG [Thread-19] - enter HttpConnection.close() >08:54:37 DEBUG [Thread-19] - enter >HttpConnection.closeSockedAndStreams() >08:54:37 DEBUG [Thread-19] - enter HttpConnection.close() >08:54:37 DEBUG [Thread-19] - enter >HttpConnection.closeSockedAndStreams() >08:54:37 DEBUG [Thread-19] - enter HttpConnection.close() >08:54:37 DEBUG [Thread-19] - enter >HttpConnection.closeSockedAndStreams() >08:54:37 DEBUG [Thread-19] - enter HttpConnection.releaseConnection() >08:54:37 ERROR [Thread-19] - I/O exception executing the get data >request 'Execute'. >java.net.SocketException: Socket closed > at java.net.SocketOutputStream.socketWrite0(Native Method) > at >java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) > at >java.net.SocketOutputStream.write(SocketOutputStream.java:136) > at >org.apache.commons.httpclient.HttpConnection$WrappedOutputStream.write(H >ttpConnection.java:1368) > at >java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69) > at >java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127) > at >org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(Ht >tpConnection.java:799) > at >org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase >.java:2324) > at >org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBa >se.java:2657) > at >org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java >:1093) > at >org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:6 >75) > at >org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:5 >29) > at >pbf.travinfo.dcol.CHPDI.AgentLibrary.getSOAPResponse(AgentLibrary.java:6 >48) > >--------------------------------------------------------------------- >To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org >For additional commands, e-mail: >commons-httpclient-dev-help@jakarta.apache.org --=====================_101944698==.ALT--