Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6.4k views
in Java FTP by (160 points)
Hi,

I am using eedtftpj free and I am experiencing 425 errors and socket timeouts as follows :

com.enterprisedt.net.ftp.FTPException: Can't open passive connection: Permission denied.
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:1068)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.java:730)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:505)
at com.enterprisedt.net.ftp.FTPClient.setupDataSocket(FTPClient.java:2217)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3048)
at com.enterprisedt.net.ftp.FTPClient.dirDetails(FTPClient.java:3006)
at dil.ftpmediation.ThirdFtpClient.ListFiles(ThirdFtpClient.java:227)
at dil.ftpmediation.FtpProcess.ReadSubDirAndDownloadFile(FtpProcess.java:671)
at dil.ftpmediation.FtpProcess.ReadSubDirAndDownloadFile(FtpProcess.java:725)
at dil.ftpmediation.FtpProcess.ReadSubDirAndDownloadFile(FtpProcess.java:725)
at dil.ftpmediation.FtpProcess.ReadSubDirAndDownloadFile(FtpProcess.java:660)
at dil.ftpmediation.FtpProcess.WatchDoggedProceed(FtpProcess.java:357)
at dil.ftpmediation.FtpProcess.Proceed(FtpProcess.java:231)
at dil.ftpmediation.MediationFtpMultiThreaded$MediationFtpTask.run(MediationFtpMultiThreaded.java:232)
at com.mycom.shared.thread.SupervisedTask$RunningTask.run(SupervisedTask.java:66)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)

and :

java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.enterprisedt.net.ftp.internal.SocketUtils.createSocket(SocketUtils.java:94)
at com.enterprisedt.net.ftp.FTPControlSocket.<init>(FTPControlSocket.java:310)
at com.enterprisedt.net.ftp.FTPClient.connect(FTPClient.java:862)
at dil.ftpmediation.ThirdFtpClient.connect(ThirdFtpClient.java:35)
at dil.ftpmediation.FtpProcess.Connection(FtpProcess.java:276)
at dil.ftpmediation.FtpProcess.WatchDoggedProceed(FtpProcess.java:288)
at dil.ftpmediation.FtpProcess.Proceed(FtpProcess.java:231)
at dil.ftpmediation.MediationFtpMultiThreaded$MediationFtpTask.run(MediationFtpMultiThreaded.java:232)
at com.mycom.shared.thread.SupervisedTask$RunningTask.run(SupervisedTask.java:66)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)


This happens frequently. Any ideas ?

Thank you,
Syl

3 Answers

0 votes
by (162k points)
This often happens if you are transferring lots of small files at once - is this the case?
0 votes
by (160 points)
Yes, exactly. We often have a 426 error as well (Interrupted System Call). Is there a workaround ?
0 votes
by (162k points)
Unfortunately this can be a problem in FTP - it is because a new socket is used for every transfer or listing, and these are a finite resource. It takes the operating system a bit of time to free up close sockets.

You may need to sleep periodically to slow down the transfers. Other approaches are to zip up small files into one large file, and unzip on the server side (or vice versa).

Categories

...