commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benzion <benzi...@yahoo.com>
Subject [NET] FTPClient SocketException: Connection reset
Date Wed, 09 Mar 2011 12:11:11 GMT
Hi, 

I run a simple client and get exception below. BTW listFiles() for other
directories of the same FTP server works OK. FTPClient.listNames() also
works OK even for problematic dir. But  listFiles() fails. 

Please advice. 

                FTPClient sc = new FTPClient(); 
                sc.connect("aaaaaaaaaa"); 
                sc.login("bbbbbb", "ccccccc"); 
                FTPFile[] fff = sc.listFiles("/somedirectory"); 

Exception in thread "main" java.net.SocketException: Connection reset 
        at java.net.SocketInputStream.read(SocketInputStream.java:168) 
        at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264) 
        at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) 
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) 
        at java.io.InputStreamReader.read(InputStreamReader.java:167) 
        at java.io.BufferedReader.fill(BufferedReader.java:136) 
        at java.io.BufferedReader.readLine(BufferedReader.java:299) 
        at java.io.BufferedReader.readLine(BufferedReader.java:362) 
        at
org.apache.commons.net.ftp.FTPFileEntryParserImpl.readNextEntry(FTPFileEntryParserImpl.java:53)

        at
org.apache.commons.net.ftp.FTPListParseEngine.readStream(FTPListParseEngine.java:157) 
        at
org.apache.commons.net.ftp.FTPListParseEngine.readServerList(FTPListParseEngine.java:101)

        at
org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2551) 
        at
org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2519) 
        at
org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2275) 
        at FTPClient.main(FTPClient.java:299)  



--
View this message in context: http://apache-commons.680414.n4.nabble.com/NET-FTPClient-SocketException-Connection-reset-tp3343448p3343448.html
Sent from the Commons - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message