jsch channel is not opened

Jsch使用的時候碰到一個問題, 調試後發現 ssh到服務器很是的卡, 創建查詢服務器內存,多是內存不夠用了。java

VFS同理。apache

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
相關文章
相關標籤/搜索