Jsch使用的时候碰到一个问题, 调试后发现 ssh到服务器非常的卡, 建立查询服务器内存,可能是内存不够用了。
VFS同理。
Session created... com.jcraft.jsch.JSchException: channel is not opened. at com.jcraft.jsch.Channel.sendChannelOpen(Channel.java:765) at com.jcraft.jsch.Channel.connect(Channel.java:151) at com.jcraft.jsch.Channel.connect(Channel.java:145) at .application.ftp.SftpTemplate.getChannel(SftpTemplate.java:46) at
org.apache.commons.vfs2.FileSystemException: Unknown message with code "Could not determine the type of file "sftp:///".".
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.refresh(SftpFileObject.java:83)
at org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:337)
at org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:300)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:75)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:55)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:711)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:648)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "sftp:///".
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1291)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.refresh(SftpFileObject.java:81)
... 20 more
Caused by: org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "sftp:///".
at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:127)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.statSelf(SftpFileObject.java:127)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetType(SftpFileObject.java:97)
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1285)
... 21 more
Caused by: com.jcraft.jsch.JSchException: channel is not opened.
at com.jcraft.jsch.Channel.sendChannelOpen(Channel.java:765)
at com.jcraft.jsch.Channel.connect(Channel.java:151)
at com.jcraft.jsch.Channel.connect(Channel.java:145)
at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:101)
... 24 more
.application.vfs.VfsWrapperException: Caused by: Unknown message with code "Could not determine the type of file "sftp:///".". Caused by: Could not determine the type of file "sftp:///". Caused by: Could not connect to SFTP server at "sftp:///". Caused by: channel is not opened.
Caused by: org.apache.commons.vfs2.FileSystemException: Unknown message with code "Could not determine the type of file "sftp:///".".
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.refresh(SftpFileObject.java:83)
at org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:337)
at org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:300)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:75)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:55)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:711)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:648)
... 13 more
Caused by: org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "sftp:///".
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1291)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.refresh(SftpFileObject.java:81)
... 20 more
Caused by: org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "sftp:///".
at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:127)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.statSelf(SftpFileObject.java:127)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetType(SftpFileObject.java:97)
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1285)
... 21 more
Caused by: com.jcraft.jsch.JSchException: channel is not opened.
at com.jcraft.jsch.Channel.sendChannelOpen(Channel.java:765)
at com.jcraft.jsch.Channel.connect(Channel.java:151)
at com.jcraft.jsch.Channel.connect(Channel.java:145)
at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:101)
... 24 more