You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by Benzion <be...@yahoo.com> on 2011/03/09 09:14:02 UTC

[NET] java.net.SocketException: Connection reset

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-java-net-SocketException-Connection-reset-tp3343004p3343004.html
Sent from the Commons - Issues mailing list archive at Nabble.com.

Re: [NET] java.net.SocketException: Connection reset

Posted by sebb <se...@gmail.com>.
On 9 March 2011 08:14, Benzion <be...@yahoo.com> wrote:
> 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.

Please subscribe to the user mailing list and ask there.


>                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-java-net-SocketException-Connection-reset-tp3343004p3343004.html
> Sent from the Commons - Issues mailing list archive at Nabble.com.
>