commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "linux\.power" <linux.po...@laposte.net>
Subject [net] Problem with timeout and threads ?!
Date Tue, 20 Jun 2006 13:28:22 GMT
Hi everybody !

I have a daemon program that fetches files by ftp every 30
minutes. I use commons net in order to fetch theses ftp files.

It works well during a good time but after a few days, it
doesn't fetch anything.
I realized that one thread was blocked, so no more files
was fetched :

Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:474)
org.apache.commons.net.telnet.TelnetInputStream.read(TelnetInputStream.java:339)
org.apache.commons.net.telnet.TelnetInputStream.read(TelnetInputStream.java:466)
java.io.BufferedInputStream.read1(BufferedInputStream.java:254)
java.io.BufferedInputStream.read(BufferedInputStream.java:313)
sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
java.io.InputStreamReader.read(InputStreamReader.java:167)
java.io.BufferedReader.fill(BufferedReader.java:136)
java.io.BufferedReader.readLine(BufferedReader.java:299)
java.io.BufferedReader.readLine(BufferedReader.java:362)
org.apache.commons.net.ftp.FTP.__getReply(FTP.java:264)
org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:460)
org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:520)
org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:520)
org.apache.commons.net.ftp.FTPClient.retrieveFileStream(FTPClient.java:1342)

For information, I set a time out by using "setDataTimeout"
on FTPClient.

I don't know what happen ! Can you help me ?
Is there a way with "setReaderThread(false)" ?!

Thanks in advance :)

Accédez au courrier électronique de La Poste : www.laposte.net
3615 LAPOSTENET (0,34 €/mn)



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


Mime
View raw message