Hello
we are experiencing a strange behaviour of VFS with vsFTPd
with 2.1-SNAPSHOT version on trunk.
We have a cycle in which periodically tests if a file exists, exiting once
it has been found.
If the vsFTPd session timeout (idle_session_timeout parameter) has been
met, we receive a FileSystemException, due to a broken pipe (see stack
trace below). It seems that the problem happens when sending the QUIT
command after a failed LIST.

I would like to fix this problem with a patch, however:
1. do you think it is a bug at all?
2. what is the best strategy? Trapping the exception in
FtpClientWrapper.disconnect? Or in .listFiles?

Thanks in advance

Antonio

------------

The stacktrace and relevant log:


--> Log before exception
PORT 127,0,0,1,220,47

421 Timeout.

--> Stacktrace

org.apache.commons.vfs2.FileSystemException: Could not determine the type
of file "ftp://localhost/xxx";.
at
org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1526)
at
org.apache.commons.vfs2.provider.AbstractFileObject.exists(AbstractFileObject.java:1022)
at mystuff...
Caused by: java.net.SocketException: Pipe interrotta
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at java.io.BufferedWriter.flush(BufferedWriter.java:254)
at org.apache.commons.net.ftp.FTP.__send(FTP.java:505)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:479)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:608)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:582)
at org.apache.commons.net.ftp.FTP.quit(FTP.java:864)
at
org.apache.commons.vfs2.provider.ftp.FTPClientWrapper.disconnect(FTPClientWrapper.java:113)
at
org.apache.commons.vfs2.provider.ftp.FTPClientWrapper.listFiles(FTPClientWrapper.java:139)
at
org.apache.commons.vfs2.provider.ftp.FtpFileObject.doGetChildren(FtpFileObject.java:136)
at
org.apache.commons.vfs2.provider.ftp.FtpFileObject.getChildFile(FtpFileObject.java:106)
at
org.apache.commons.vfs2.provider.ftp.FtpFileObject.getInfo(FtpFileObject.java:192)
at
org.apache.commons.vfs2.provider.ftp.FtpFileObject.doGetType(FtpFileObject.java:320)
at
org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1517)
... 3 more

Reply via email to