Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.

Error during FTP upload

no avatar
User

eting

Posts

4

Joined

Fri Aug 08, 2008 5:09 am

Error during FTP upload

by eting » Fri Aug 08, 2008 5:19 am

Hi,
We were doing a stress test to upload files to an FTP server, uploading hundreds of files. Every time during the stress test, one file would fail to upload, and we got this exception:

com.enterprisedt.net.ftp.FTPException: OOPS: listen
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:773)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.java:494)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:364)
at com.enterprisedt.net.ftp.FTPClient.initPut(FTPClient.java:1344)
at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:1421)
at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:1401)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1227)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1195)

What does this mean and how do I resolve it?

Thank you very much in advance,
Eting
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Error during FTP upload

by support2 » Fri Aug 08, 2008 7:12 am

This is a message sent back from the FTP server. It could mean it failed to open a listening socket.

If you are uploading hundreds of files, because FTP uses a new socket connection for each transfer, you'll eventually run out of sockets and have to pause the transfers for a little while to free them up. See the documentation or google for TIME_WAIT.
no avatar
User

eting

Posts

4

Joined

Fri Aug 08, 2008 5:09 am

by eting » Fri Aug 08, 2008 8:01 am

Thanks, this makes sense.

Is there anything I can do through the software? For example:

if (out_of_sockets)
{
wait_a_bit
}
else
{
continue_uploading..
}

I mean, are there any functions or methods I can use from the Edtftp packages?

Thanks a lot,
Elaine
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

by support2 » Fri Aug 08, 2008 8:41 am

One common approach is to catch IOException (which generally means this problem has occurred), wait for maybe 10-30s, and then resume your transfers. This gives time for the operating system to free up sockets in TIME_WAIT.

Who is online

Users browsing this forum: No registered users and 16 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign