Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 43672 invoked from network); 6 Aug 2007 06:20:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Aug 2007 06:20:23 -0000 Received: (qmail 48230 invoked by uid 500); 6 Aug 2007 06:20:21 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 48151 invoked by uid 500); 6 Aug 2007 06:20:21 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 48142 invoked by uid 99); 6 Aug 2007 06:20:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Aug 2007 23:20:21 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Aug 2007 06:20:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2B98E7141ED for ; Sun, 5 Aug 2007 23:19:59 -0700 (PDT) Message-ID: <4916229.1186381199158.JavaMail.jira@brutus> Date: Sun, 5 Aug 2007 23:19:59 -0700 (PDT) From: "Vasily Ivanov (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (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.) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VFS-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517832 ] Vasily Ivanov commented on VFS-120: ----------------------------------- Thanks, Harald. I've noticed your comment above. The only problem is that's in production. :-( Anyway thanks a lot for a workaround, we will implement that unless fix will be released. > 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.