前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >jsch channel is not opened

jsch channel is not opened

作者头像
stys35
发布2019-03-05 16:30:19
3.1K0
发布2019-03-05 16:30:19
举报
文章被收录于专栏:工作笔记精华工作笔记精华

Jsch使用的时候碰到一个问题, 调试后发现 ssh到服务器非常的卡, 建立查询服务器内存,可能是内存不够用了。

VFS同理。

代码语言:javascript
复制
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
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018/09/20 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档