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:[EMAIL PROTECTED] 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.<init>(Unknown Source) at java.net.Socket.<init>(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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]