[
https://issues.apache.org/jira/browse/VFS-662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17170858#comment-17170858
]
Manish Bansal commented on VFS-662:
-----------------------------------
This issue is still not fixed. Although author made correct changes, but the
changes merged were not proper. Can anyone please check. I have raised the same
issue in VFS-778.
> SftpFileSystem has Thread-safe issue about idleChannel
> -------------------------------------------------------
>
> Key: VFS-662
> URL: https://issues.apache.org/jira/browse/VFS-662
> Project: Commons VFS
> Issue Type: Bug
> Reporter: qxo
> Priority: Critical
> Fix For: 2.4
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {code}
> {code:java}
> Caused by: org.apache.commons.vfs2.FileSystemException: Could not connect to
> SFTP server at
> at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getChannel
> (SftpFileSystem.java:149)
> at org.apache.commons.vfs2.provider.sftp.SftpFileObject.statSelf
> (SftpFileObject.java:152)
> at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetType
> (SftpFileObject.java:113)
> at org.apache.commons.vfs2.provider.AbstractFileObject.getType
> (AbstractFileObject.java:1517)
> at org.apache.commons.vfs2.provider.sftp.SftpFileObject.refresh
> (SftpFileObject.java:90)
> at org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile
> (AbstractFileSystem.java:364)
> at org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile
> (AbstractFileSystem.java:317)
> at org.apache.commons.vfs2.provider.AbstractFileObject.resolveFile
> (AbstractFileObject.java:2039)
> at org.apache.commons.vfs2.FileObject$resolveFile$23.call (Unknown Source)
> Caused by: com.jcraft.jsch.JSchException: java.io.IOException: channel is
> broken
> at com.jcraft.jsch.ChannelSftp.start (ChannelSftp.java:315)
> at com.jcraft.jsch.Channel.connect (Channel.java:152)
> at com.jcraft.jsch.Channel.connect (Channel.java:145)
> at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getChannel
> (SftpFileSystem.java:113)
> at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetOutputStream
> (SftpFileObject.java:635)
> at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream
> (AbstractFileObject.java:1399)
> at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream
> (DefaultFileContent.java:479)
> at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream
> (DefaultFileContent.java:457)
> Caused by: com.jcraft.jsch.JSchException: java.net.SocketException: Broken
> pipe (Write failed)
> at com.jcraft.jsch.Channel.connect (Channel.java:159)
> at com.jcraft.jsch.Channel.connect (Channel.java:145)
> at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getChannel
> (SftpFileSystem.java:113)
> at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetOutputStream
> (SftpFileObject.java:635)
> at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream
> (AbstractFileObject.java:1399)
> at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream
> (DefaultFileContent.java:479)
> at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream
> (DefaultFileContent.java:457)
> Caused by: java.io.IOException: inputstream is closed
> at com.jcraft.jsch.ChannelSftp.fill (ChannelSftp.java:2911)
> at com.jcraft.jsch.ChannelSftp.header (ChannelSftp.java:2935)
> at com.jcraft.jsch.ChannelSftp.checkStatus (ChannelSftp.java:2473)
> at com.jcraft.jsch.ChannelSftp.access$300 (ChannelSftp.java:36)
> at com.jcraft.jsch.ChannelSftp$1.flush (ChannelSftp.java:851)
> at java.io.BufferedOutputStream.flush (BufferedOutputStream.java:141)
> at org.apache.commons.vfs2.util.MonitorOutputStream.flush
> (MonitorOutputStream.java:134)
> at java.io.BufferedOutputStream.flush (BufferedOutputStream.java:141)
> at org.apache.commons.vfs2.util.MonitorOutputStream.flush
> (MonitorOutputStream.java:134)
> Caused by: com.jcraft.jsch.JSchException: session is down
> at com.jcraft.jsch.Channel.sendChannelOpen (Channel.java:762)
> 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:113)
> at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetOutputStream
> (SftpFileObject.java:635)
> at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream
> (AbstractFileObject.java:1399)
> at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream
> (DefaultFileContent.java:479)
> at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream
> (DefaultFileContent.java:457)
> Caused by: java.net.SocketException: Broken pipe (Write failed)
> at java.net.SocketOutputStream.socketWrite0 (Native Method)
> at java.net.SocketOutputStream.socketWrite (SocketOutputStream.java:111)
> at java.net.SocketOutputStream.write (SocketOutputStream.java:155)
> at com.jcraft.jsch.IO.put (IO.java:60)
> at com.jcraft.jsch.Session._write (Session.java:1379)
> at com.jcraft.jsch.Session.write (Session.java:1343)
> at com.jcraft.jsch.ChannelSftp.sendOPEN (ChannelSftp.java:2583)
> at com.jcraft.jsch.ChannelSftp.sendOPENW (ChannelSftp.java:2571)
> at com.jcraft.jsch.ChannelSftp.put (ChannelSftp.java:753)
> at com.jcraft.jsch.ChannelSftp.put (ChannelSftp.java:709)
> at com.jcraft.jsch.ChannelSftp.put (ChannelSftp.java:703)
> at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetOutputStream
> (SftpFileObject.java:636)
> at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream
> (AbstractFileObject.java:1399)
> at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream
> (DefaultFileContent.java:479)
> at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream
> (DefaultFileContent.java:457)
> {code}
> the patch code : https://github.com/apache/commons-vfs/pull/36
--
This message was sent by Atlassian Jira
(v8.3.4#803005)