Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

FTPSClient issue

843790Dec 4 2008 — edited Aug 20 2009
I am using org.apache.commons.net.ftp.FTPSClient to coonect to an FTPS server. I am getting an exception
java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(Unknown Source)
        at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
        at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
        at sun.nio.cs.StreamDecoder.read(Unknown Source)
        at java.io.InputStreamReader.read(Unknown Source)
        at java.io.BufferedReader.fill(Unknown Source)
        at java.io.BufferedReader.readLine(Unknown Source)
        at java.io.BufferedReader.readLine(Unknown Source)
        at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:294)
        at org.apache.commons.net.ftp.FTP._connectAction_(FTP.java:364)
        at org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:5
40)
        at org.apache.commons.net.ftp.FTPSClient._connectAction_(FTPSClient.java
:167)
        at org.apache.commons.net.SocketClient.connect(SocketClient.java:231)
        at FTPSExample.main(FTPSExample.java:91)
Code:
        ftps = new FTPSClient("SSL",false);
        try {
            int reply;
            InetAddress Address = InetAddress.getLocalHost(); 
            ftps.connect(server, 21, Address, 50001);
I am not sure where I am going wrong.
Can you please help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2009
Added on Dec 4 2008
4 comments
680 views