org.apache.commons.vfs.FileSystemException: Could not close the input stream for file "sftp://maan:maan@vikas/transport/source/text_100mb.txt".

Apache's JIRA Issue Tracker | Harald Brabenetz | 10 years ago
  1. 0

    [VFS-120] SFTP-Exception: "com.jcraft.jsch.JSchException: session is down" if the SFTP-Server was killed and restarted (a normal shutdown of the SFTP-Server occured no Exception after restart.) - ASF JIRA

    apache.org | 11 months ago
    org.apache.commons.vfs.FileSystemException: Could not close the input stream for file "sftp://maan:maan@vikas/transport/source/text_100mb.txt".
  2. 0

    The error occured after restarting if the SFTP-Server was KILLed!!. With a normal shutdown of the SFTP-Server, no exception after restarting occured. I found no function to force the reset of the session in SftpFileSystem.java There is a function: DefaultFileSystemManager manager = (DefaultFileSystemManager)VFS.getManager(); manager.freeUnusedResources(); But this works only if AbstractFileSystem.isReleaseable() returns true. And this this function return only true if all SFTP-FileObject are removed from the GarbageCollection (finally()-Methode). I cannot force a GarbageCollection. So there is no way to handle this Error! I must restart the VM (ServletContainer). org.apache.commons.vfs.FileSystemException: Could not copy "file:///C:/TEMP/....." to "sftp://......". at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:902) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl.exportChatMessages(Unknown Source) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl.startExportNow(Unknown Source) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl$ExportManagerRunnable.run(Unknown Source) at java.lang.Thread.run(Thread.java:595) Caused by: org.apache.commons.vfs.FileSystemException: Could not write to "sftp://chat:chat@10.1.5.130/home/chat/chatfile_12.zip". at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1227) at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:373) at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:356) at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:100) at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:893) ... 4 more Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://chat:chat@10.1.5.130/". at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:144) at org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetOutputStream(SftpFileObject.java:402) at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1219) ... 8 more Caused by: com.jcraft.jsch.JSchException: session is down at com.jcraft.jsch.Session.openChannel(Session.java:756) at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:122) ... 10 more

    Apache's JIRA Issue Tracker | 10 years ago | Harald Brabenetz
    org.apache.commons.vfs.FileSystemException: Could not close the input stream for file "sftp://maan:maan@vikas/transport/source/text_100mb.txt".
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    The error occured after restarting if the SFTP-Server was KILLed!!. With a normal shutdown of the SFTP-Server, no exception after restarting occured. I found no function to force the reset of the session in SftpFileSystem.java There is a function: DefaultFileSystemManager manager = (DefaultFileSystemManager)VFS.getManager(); manager.freeUnusedResources(); But this works only if AbstractFileSystem.isReleaseable() returns true. And this this function return only true if all SFTP-FileObject are removed from the GarbageCollection (finally()-Methode). I cannot force a GarbageCollection. So there is no way to handle this Error! I must restart the VM (ServletContainer). org.apache.commons.vfs.FileSystemException: Could not copy "file:///C:/TEMP/....." to "sftp://......". at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:902) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl.exportChatMessages(Unknown Source) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl.startExportNow(Unknown Source) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl$ExportManagerRunnable.run(Unknown Source) at java.lang.Thread.run(Thread.java:595) Caused by: org.apache.commons.vfs.FileSystemException: Could not write to "sftp://chat:chat@10.1.5.130/home/chat/chatfile_12.zip". at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1227) at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:373) at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:356) at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:100) at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:893) ... 4 more Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://chat:chat@10.1.5.130/". at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:144) at org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetOutputStream(SftpFileObject.java:402) at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1219) ... 8 more Caused by: com.jcraft.jsch.JSchException: session is down at com.jcraft.jsch.Session.openChannel(Session.java:756) at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:122) ... 10 more

    Apache's JIRA Issue Tracker | 10 years ago | Harald Brabenetz
    org.apache.commons.vfs.FileSystemException: Could not close the input stream for file "sftp://maan:maan@vikas/transport/source/text_100mb.txt".
  5. 0

    [VFS-113] NullPointerException during getting InputStream from SftpFileObject - ASF JIRA

    apache.org | 1 year ago
    org.apache.commons.vfs.FileSystemException: Could not read file "sftp://maan:maan@vikas/transport/source/students1.txt".

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.commons.vfs.FileSystemException

      Could not close the input stream for file "sftp://maan:maan@vikas/transport/source/text_100mb.txt".

      at org.apache.commons.vfs.provider.DefaultFileContent$FileContentInputStream.close()
    2. Commons VFS
      DefaultFileContent$FileContentInputStream.close
      1. org.apache.commons.vfs.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:565)
      1 frame
    3. com.adeptia.indigo
      FtpSource.dispose
      1. com.adeptia.indigo.services.transport.ftp.FtpSource.dispose(FtpSource.java:201)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    5. Commons Modeler
      BaseModelMBean.invoke
      1. org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:483)
      1 frame
    6. Java RT
      DefaultMBeanServerInterceptor.invoke
      1. com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source)
      2. com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
      3. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
      3 frames