org.apache.commons.net.ftp.FTPConnectionClosedException: Connection closed without indication.
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:297)
at org.apache.commons.net.ftp.FTP.getReply(FTP.java:619)
at org.apache.commons.net.ftp.FTPClient.completePendingCommand(FTPClient.java:1244)
at org.apache.commons.net.ftp.FTPClient.retrieveFile(FTPClient.java:1301)
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:297)
at org.apache.commons.net.ftp.FTP.getReply(FTP.java:619)
at org.apache.commons.net.ftp.FTPClient.completePendingCommand(FTPClient.java:1244)
at org.apache.commons.net.ftp.FTPClient.retrieveFile(FTPClient.java:1301)
As download worked from the browser, I thought this kinda odd. Looking a little closer, I decided to manually try the steps from the command line and see if I could figure out what was going on.
I ftp'd in and did the same commands I was doing from Java (passive, binary, etc).
When I tried to 'get
150 Opening BINARY mode data connection for aopalliance-1.0.jar (6371 bytes).
421 Service not available, remote server has closed connection
ftp>
421 Service not available, remote server has closed connection
ftp>
Since I had found through my debugging that after the exception, the 150 FILE_STATUS_OK was the last reply I got; I looked up 421. It appears that there is a current bug on OpenSolaris that causes this behavior.
So here's the workaround (for the setup I did yesterday):
cp /lib/libsendfile.so.1 /home/ftp/lib
chown root:bin /home/ftp/lib/libsendfile.so.1
chown root:bin /home/ftp/lib/libsendfile.so.1
svcadm restart ftp
Everything works beautifully now :)
org.apache.commons.net.ftp.FTPConnectionClosedException: Connection closed without indication.
ReplyDeleteat org.apache.commons.net.ftp.FTP.__getReply(FTP.java:253)
at org.apache.commons.net.ftp.FTP.getReply(FTP.java:523)
at org.apache.commons.net.ftp.FTPClient.completePendingCommand(FTPClient.java:1225)
at org.apache.commons.net.ftp.FTPClient.retrieveFile(FTPClient.java:1282)
I am getting the same exception but in Linux.
tell me the what are the steps needs to be followed
Go to this link for solution:
Deletehttp://getfundas746.blogspot.in/2012/12/orgapachecommonsnetftpftpconnectionclos.html
I haven't tried it on Linux before. Per the referenced bug report, I'd probably try to "Manually copy /lib/libsendfile.so.1 to the anonymous ftp lib directory"
ReplyDelete