commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (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.)
Date Mon, 06 Aug 2007 06:39:59 GMT

    [ https://issues.apache.org/jira/browse/VFS-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517821
] 

bas edited comment on VFS-120 at 8/5/07 11:39 PM:
------------------------------------------------------------

I am facing the same problem too.

That's an exception I'm getting when SFTP server goes down:
org.apache.commons.vfs.FileSystemException: Could not find files in "sftp://***/public/download".
        at org.apache.commons.vfs.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1518)
        at org.apache.commons.vfs.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1061)
        ... 6 more
Caused by: org.apache.commons.vfs.FileSystemException: Could not list the contents of folder
"sftp://***/public/download".
        at org.apache.commons.vfs.provider.AbstractFileObject.getChildren(AbstractFileObject.java:576)
        at org.apache.commons.vfs.provider.AbstractFileObject.traverse(AbstractFileObject.java:1542)
        at org.apache.commons.vfs.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1513)
        ... 7 more
Caused by: 4:
        at com.jcraft.jsch.ChannelSftp._stat(Unknown Source)
        at com.jcraft.jsch.ChannelSftp.stat(Unknown Source)a
        at com.jcraft.jsch.ChannelSftp.ls(Unknown Source)
        at org.apache.commons.vfs.provider.sftp.SftpFileObject.doListChildrenResolved(SftpFileObject.java:262)
        at org.apache.commons.vfs.provider.AbstractFileObject.getChildren(AbstractFileObject.java:571)
        ... 9 more
Caused by: java.lang.NullPointerException
        at com.jcraft.jsch.ChannelSftp.fill(Unknown Source)
        at com.jcraft.jsch.ChannelSftp.header(Unknown Source)
        ... 14 more

And than on any subsequent call I'm getting that "com.jcraft.jsch.JSchException: session is
down" exception.

The only fix is to restart the whole application.

I need this fix asap. Thank you.

      was (Author: bas):
    I am facing the same problem too.

That's an exception I'm getting when SFTP server goes down:
org.apache.commons.vfs.FileSystemException: Could not find files in "sftp://***/public/download".
        at org.apache.commons.vfs.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1518)
        at org.apache.commons.vfs.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1061)
        ... 6 more
Caused by: org.apache.commons.vfs.FileSystemException: Could not list the contents of folder
"sftp://202.139.115.155/public/download".
        at org.apache.commons.vfs.provider.AbstractFileObject.getChildren(AbstractFileObject.java:576)
        at org.apache.commons.vfs.provider.AbstractFileObject.traverse(AbstractFileObject.java:1542)
        at org.apache.commons.vfs.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1513)
        ... 7 more
Caused by: 4:
        at com.jcraft.jsch.ChannelSftp._stat(Unknown Source)
        at com.jcraft.jsch.ChannelSftp.stat(Unknown Source)a
        at com.jcraft.jsch.ChannelSftp.ls(Unknown Source)
        at org.apache.commons.vfs.provider.sftp.SftpFileObject.doListChildrenResolved(SftpFileObject.java:262)
        at org.apache.commons.vfs.provider.AbstractFileObject.getChildren(AbstractFileObject.java:571)
        ... 9 more
Caused by: java.lang.NullPointerException
        at com.jcraft.jsch.ChannelSftp.fill(Unknown Source)
        at com.jcraft.jsch.ChannelSftp.header(Unknown Source)
        ... 14 more

And than on any subsequent call I'm getting that "com.jcraft.jsch.JSchException: session is
down" exception.

The only fix is to restart the whole application.

I need this fix asap. Thank you.
  
> 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.)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: VFS-120
>                 URL: https://issues.apache.org/jira/browse/VFS-120
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Tomcat 5.5
> JDK 6.0 (build with JDK 5)
> commons-vfs-1.0.jar:
> Specification-Title: Commons VFS
> Implementation-Version: 1.0
> JSCH: jsch-0.1.31.jar
>            Reporter: Harald Brabenetz
>            Priority: Critical
>         Attachments: SftpFileSystem-patch.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message