Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 75855 invoked from network); 8 Feb 2007 07:27:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2007 07:27:56 -0000 Received: (qmail 57380 invoked by uid 500); 8 Feb 2007 07:27:58 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 57370 invoked by uid 500); 8 Feb 2007 07:27:58 -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 57358 invoked by uid 99); 8 Feb 2007 07:27:58 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Feb 2007 23:27:58 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [159.134.118.20] (HELO mail04.svc.cra.dublin.eircom.net) (159.134.118.20) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 07 Feb 2007 23:27:47 -0800 Received: (qmail 33878 messnum 5272161 invoked from network[81.178.125.65/81-178-125-65.dsl.pipex.com]); 8 Feb 2007 07:27:26 -0000 Received: from 81-178-125-65.dsl.pipex.com (HELO ?127.0.0.1?) (81.178.125.65) by mail04.svc.cra.dublin.eircom.net (qp 33878) with SMTP; 8 Feb 2007 07:27:26 -0000 Message-ID: <45CAD07C.6070806@eircom.net> Date: Thu, 08 Feb 2007 07:25:48 +0000 From: Rory Winston User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: [net-ftp] FTPS timeout when trying to upload a file References: <000001c74b39$711c5610$6501a8c0@neilhp> In-Reply-To: <000001c74b39$711c5610$6501a8c0@neilhp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Neil What IP address is 172.20.10.50? Or is it your default gateway? Thanks Rory > Hello all: > > I think I found something: > > When my FTP client switches to passive mode, it gets back > this string from the server: > 227 Entering Passive Mode (172,20,10,50,27,91) > Which tells the FTP client to connect to 172.20.10.50 > port 7003. > > But, admin.quiksilver.com is 66.161.40.76, not > 172.20.10.50. > > I when to the FTPSClient code and forced the > method __parsePassiveModeReply to set the > __passiveHost to "66.161.40.76" > and tried it again. > > Everything worked fine. > > So, the server is giving out a bogus IP > address in the passive reply. If we force it > to be the IP address of the server, things work > fine. > > Is there a way to countermand the incorrect behavior > of the server? > > Thanks, > Neil > > -- > Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com > FREE! Eliminate junk email and reclaim your inbox. > Visit http://www.spammilter.com for details. > > -----Original Message----- > From: Neil Aggarwal [mailto:neil@jammconsulting.com] > Sent: Wednesday, February 07, 2007 9:32 PM > To: commons-user@jakarta.apache.org > Subject: [net-ftp] FTPS timeout when trying to upload a file > > Hello: > > I downloaded the commons-net-2.0 snapshot jar from > http://people.apache.org/~rwinston/commons-net-2.0/ > > When I try to upload a file to a server that > requires FTPS, I get a timeout when I call the storeFile > method. > > Here is the stacktrace: > > at java.net.PlainSocketImpl.socketConnect(Native Method) > at java.net.PlainSocketImpl.doConnect(Unknown Source) > at java.net.PlainSocketImpl.connectToAddress(Unknown Source) > at java.net.PlainSocketImpl.connect(Unknown Source) > at java.net.SocksSocketImpl.connect(Unknown Source) > at java.net.Socket.connect(Unknown Source) > at java.net.Socket.connect(Unknown Source) > at java.net.Socket.(Unknown Source) > at java.net.Socket.(Unknown Source) > at javax.net.DefaultSocketFactory.createSocket(Unknown Source) > at > org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:516 > ) > at > org.apache.commons.net.ftp.FTPSClient._openDataConnection_(FTPSClient.java:4 > 69) > at > org.apache.commons.net.ftp.FTPClient.__storeFile(FTPClient.java:388) > at > org.apache.commons.net.ftp.FTPClient.storeFile(FTPClient.java:1391) > > Here is my code: > > ftps = new FTPSClient("SSL"); > ftps.addProtocolCommandListener(new PrintCommandListener(new > PrintWriter(System.out))); > ftps.connect("admin.quiksilver.com"); > ftps.login("neil", "mypass")); > ftps.enterLocalPassiveMode(); > FileInputStream inStream = new FileInputStream("myFile.txt"); > ftps.storeFile("myFile.txt",inStream); > > Here is the output from the protocol command listener: > > 220 Gene6 FTP Server v3.8.0 (Build 34) ready... > AUTH TLS > 234 AUTH command ok; starting SSL connection. > USER neil > 331 Password required for neil. > PASS mypass > 230 User neil logged in. > PASV > 227 Entering Passive Mode (172,20,10,50,27,91) > > Any ideas? > > Thanks, > Neil > > -- > Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com > FREE! Eliminate junk email and reclaim your inbox. > Visit http://www.spammilter.com for details. > > > --------------------------------------------------------------------- > 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