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]

Reply via email to