I received a time out if I didn't stop the execution:
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl .java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSoc ketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.j ava:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.j ava:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at javax.net.DefaultSocketFactory.createSocket(Socket Factory.java:206)
at org.apache.commons.net.ftp.FTPClient._openDataConn ection_(FTPClient.java:502)
at org.apache.commons.net.ftp.FTPClient.retrieveFile( FTPClient.java:1276)
at FTPManager.scanDirectoryTree(FTPManager.java:104)
at FTPManager.scanDirectoryTree(FTPManager.java:156)
at FTPManager.scanFolder(FTPManager.java:53)
at Main.main(Main.java:8)
org.apache.commons.net.ftp.FTPConnectionClosedExce ption: FTP response 421 received. Server closed connection.
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java :346)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.jav a:490)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.jav a:534)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.jav a:583)
at org.apache.commons.net.ftp.FTP.pasv(FTP.java:882)
at org.apache.commons.net.ftp.FTPClient._openDataConn ection_(FTPClient.java:497)
at org.apache.commons.net.ftp.FTPClient.initiateListP arsing(FTPClient.java:2296)
at org.apache.commons.net.ftp.FTPClient.initiateListP arsing(FTPClient.java:2269)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTP Client.java:2046)
at FTPManager.scanDirectoryTree(FTPManager.java:79)
at FTPManager.scanFolder(FTPManager.java:53)
at Main.main(Main.java:8)
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutp utStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStre am.java:136)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder. java:202)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEnc oder.java:272)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.j ava:276)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java: 122)
at java.io.OutputStreamWriter.flush(OutputStreamWrite r.java:212)
at java.io.BufferedWriter.flush(BufferedWriter.java:2 36)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.jav a:472)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.jav a:534)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.jav a:583)
at org.apache.commons.net.ftp.FTP.quit(FTP.java:794)
at org.apache.commons.net.ftp.FTPClient.logout(FTPCli ent.java:697)
at FTPManager.scanFolder(FTPManager.java:69)
at Main.main(Main.java:8)