Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 19129 invoked from network); 1 Sep 2005 18:56:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Sep 2005 18:56:04 -0000 Received: (qmail 88156 invoked by uid 500); 1 Sep 2005 18:55:59 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 88137 invoked by uid 500); 1 Sep 2005 18:55:59 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 88124 invoked by uid 99); 1 Sep 2005 18:55:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2005 11:55:58 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jsurf@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 01 Sep 2005 11:56:13 -0700 Received: (qmail invoked by alias); 01 Sep 2005 18:55:56 -0000 Received: from p548D2201.dip0.t-ipconnect.de (EHLO [192.168.178.25]) [84.141.34.1] by mail.gmx.net (mp003) with SMTP; 01 Sep 2005 20:55:56 +0200 X-Authenticated: #1112833 Message-ID: <43174EBF.80608@gmx.de> Date: Thu, 01 Sep 2005 20:55:59 +0200 From: Jens Viebig User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: [VFS] FTPClientWrapper Broken Pipe References: <019b01c5af0f$9a4328b0$fe78a8c0@jviebigXP> <43173420.8050406@ops.co.at> <4317352A.10908@elcock.org> In-Reply-To: <4317352A.10908@elcock.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, how do you set a timeout on the client side ? My ftp server times out after 5 minutes, normally the connection restarts as expected. My code runs inside a background service that is running 24/7 so there are a lot of things that can cause an 'unexpected' IOException. A physical network is never perfect. Im using bea jrockit jvm that is 1.4 compatible Im using commons-net 1.4 Yes it seems that isConnected() that is used in FTPClientWrapper does not do a physical test. I think i will try to replace all catch blocks catch (FTPConnectionClosedException e) with catch(IOException e) in FTPClientWrapper FTPConnectionClosedException is a subclass of IOException so there is no need to have two catch blocks. Hope this will be fixed in official future releases of commons-VFS Regards Andrew Elcock wrote: > What I did to get round this is to apply a timeout and after a certain > time I "restart" the connection. I hope this works for you to... > > Mario Ivankovits wrote: > >> Hi! >> >>> Caused by: java.net.SocketException: Broken pipe >>> >> >> >> Do you know why this happens? Some sort of ftp timeout? >> >>> catch (IOException ie) >>> { >>> disconnect(); >>> throw ie; >>> } >>> >> >> >> I ask as maybe we should retry the operation here too? >> >> >>> Normally isConnected() should fail then, but it seems that it still >>> returns true >> >> >> isConnected() in ftp.java is a logical operation if the connection >> "should be" established, not a physical check. >> There is also a socketIsConnected which tries to check if the >> connections is really alive but it works only with jdk1.4 and up. >> >> Which jdk do you use? >> If its 1.4 or up, which commons-net version do you use? >> >> --- >> Mario >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org >> For additional commands, e-mail: commons-user-help@jakarta.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org