Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.9k views
in Java FTP by (240 points)
why it has such exception:
       [color=red]com.enterprisedt.net.ftp.ControlChannelIOException: Connection reset by peer: socket write error
   at com.enterprisedt.net.ftp.FTPControlSocket.writeCommand(FTPControlSocket.java:941)
   at com.enterprisedt.net.ftp.FTPControlSocket.sendCommand(FTPControlSocket.java:918)
   at com.enterprisedt.net.ftp.FTPClient.pwd(FTPClient.java:3638)
   at com.enterprisedt.net.ftp.FTPClient.dirDetails(FTPClient.java:3271)
   at com.enterprisedt.net.ftp.FileTransferClient.directoryList(FileTransferClient.java:568)
   at FtpSearch.Crawer.Beta3.CrawlerMultiThread.done_zzuFTP(CrawlerMultiThread.java:134)
   at FtpSearch.Crawer.Beta3.CrawlerMultiThread.done_zzuFTP(CrawlerMultiThread.java:140)
   at FtpSearch.Crawer.Beta3.CrawlerMultiThread.done_zzuFTP(CrawlerMultiThread.java:140)
   at FtpSearch.Crawer.Beta3.CrawlerMultiThread.done_zzuFTP(CrawlerMultiThread.java:140)
   at FtpSearch.Crawer.Beta3.CrawlerMultiThread.done_zzuFTP(CrawlerMultiThread.java:140)
   at FtpSearch.Crawer.Beta3.CrawlerMultiThread.done_zzuFTP(CrawlerMultiThread.java:140)
   at FtpSearch.Crawer.Beta3.CrawlerMultiThread.run(CrawlerMultiThread.java:39)
   at java.lang.Thread.run(Unknown Source)[/color]


I wanna get all FTP's fileList include Dir and subDir. it is ok when th amount of the Dir's Document is small, but, when the amount is bigger and i used MultiThread, it comes with exception above;

I used a Thread to crawl every subDir(just the first level subDir) of RootDir. Like:
/:
A:-----------------a Thread to crawl
A1
A2
B:------------------a Thread to crawl
B1
B2
C:------------------ a Thread to crawl

When i used just a Thread to crawl the whole RootDir. it is ok with the amount of Dir either bigger or smaller.


I cannot solve it .

somebody has something of the kind ???

2 Answers

0 votes
by (240 points)
i know, may be the Dir is too deep.
0 votes
by (162k points)
It is hard to tell what's going on here - perhaps you should stick to one thread. The log file may provide some more info.

Categories

...