Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-567

Timeout in vsFTPd causes exception when executing another command

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Labels:
      None
    • Environment:

      vsFTPd 3.0.2 on Kubuntu 14.10

      Description

      After a timeout in vsFTPd, a QUIT command is sent and a 421 Timeout response is sent back to the Java client. After that, a SocketException (broken pipe) is raised and not correctly managed.

      I am attaching a test case, this is the stack trace:

      Exception in thread "main" org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "ftps://localhost/javadev/vfs/input".
      at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1526)
      at QuitProblemMain.main(QuitProblemMain.java:41)
      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.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:431)
      at sun.security.ssl.OutputRecord.write(OutputRecord.java:417)
      at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:864)
      at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:835)
      at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
      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.FTPSClient.sendCommand(FTPSClient.java:541)
      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:118)
      at org.apache.commons.vfs2.provider.ftp.FTPClientWrapper.listFiles(FTPClientWrapper.java:152)
      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)
      ... 1 more

        Attachments

        1. commons-vfs-disconnect.diff
          2 kB
          Antonio Petrelli
        2. vfs-quit-problem.zip
          1 kB
          Antonio Petrelli

          Issue Links

            Activity

              People

              • Assignee:
                b.eckenfels Bernd Eckenfels
                Reporter:
                apetrelli Antonio Petrelli
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: