With a little Googling, I find that this exception is commonly associated with Databases but I cannot find anything regarding FTP. This "Connection reset by peer" is a new one for me. : Connection reset by peer: socket write error At the following upload, all 250 connections throw this error: I have been running the program for 23 minutes and it has uploaded 5,750 files without a problem. > Could it be a Windows Server/IIS issue? // file is of type java.io.File. > Is this an OS related issue? Should I change something on the Windows XP system to allow this to work? > Is there some setting I can set in the Apache FTPClient class to check connections etc? I have also noted that it tends to throw this error after uploading 8192 bytes of a file, but this too is unpredictable. I have read that this error is usually caused by the client closing the connection, but it should not do this until the file(s) has finished uploading. See code snippet attached for our upload code. : Software caused connection abort: socket write errorĪt m.socketWr ite0(Nativ e Method)Īt m.socketWr ite(Socket OutputStre am.java:92 )Īt m.write(So cketOutput Stream.jav a:136)Īt java.io.BufferedOutputStre am.write(B ufferedOut putStream. **** Our code calls FTPClient.storeFile here ****Īt (Threa d.java:619 ) ftp.FTPClient._storeFile(FTPClient.java:399)Īt. CopyStream Exception: IOException caught while copying.Īt .io. After an unknown number of files are uploaded, the following exceptions start to appear (the CopyStreamException is thrown by the SocketException): With the above scenario, some of the files are uploaded (this is unpredictable). Now for the problem: The machines currently used to run the client side Java program are running Windows XP. They are scheduled to run every minute, so after 8 minutes 2000 files are present on the server. For example, 250 connections are created, each is given one file and these arrive on the server. > Host FTP server is running Windows 2000 Server running IIS 5.0. > Client program runs under Windows Vista. This behaviour is scheduled, so it can repeat every X minutes where X is defined by the user. Each connection runs in a separate thread, creating 250+ connections simultaneously uploading to the server. Each of these connections is then delegated a set of files which they must send to the server. As the tool is designed to put stress and load on the target FTP server, we create 250+ connections using the FTPClient class. We have a testing tool which uses the Apache Commons NET library for FTP work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |