Meaningless Drivel is fun!*
The moose likes Sockets and Internet Protocols and the fly likes FTPSClient - Connection timed out exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "FTPSClient - Connection timed out exception" Watch "FTPSClient - Connection timed out exception" New topic
Author

FTPSClient - Connection timed out exception

Divakar Sashwanth
Greenhorn

Joined: Apr 17, 2005
Posts: 11
Hi All,

I am using apache commons net 2.2's API to create a connection to a secured FTP server and file transfer to and from the FTP server. I am using FTPSClient to achieve this task. IBM JRE - 6

I tried connecting to the FTP server in DOS promt using "sftp username@servername", it succeeded, I was able to download and upload files but the same is not working when I tried with the FTPSClient API.

Below is the code

FTPSClient ftpClient = new FTPSClient();
ftpClient.setDefaultTimeout(100000);
ftpClient.connect("servername"); // It fails here

......



I don't know for what reason this connection is timed out. Can someone please let me know what is the reason for this exception. I tried increasing the timeout, it did not help.

Thanks much
Divakar


Divakar
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19557
    
  16

FTPS is not the same as SFTP. You're using two different protocols.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FTPSClient - Connection timed out exception
 
Similar Threads
Getting Connection Timed Out error
FTPClient
FTP Task giving "Connection timed out: connect" Error
FTPClient Applet Problem on HP-UX
ANT FTP task: Software caused connection abort: connect