[jira] [Commented] (SSHD-983) mina sshd create file system error

2020-04-26 Thread barry-gq (Jira)


[ 
https://issues.apache.org/jira/browse/SSHD-983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17092548#comment-17092548
 ] 

barry-gq commented on SSHD-983:
---

Thanks for your guidance

> mina sshd create file system error
> --
>
> Key: SSHD-983
> URL: https://issues.apache.org/jira/browse/SSHD-983
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 1.7.0
>Reporter: barry-gq
>Priority: Major
> Attachments: image-2020-04-26-11-14-30-914.png
>
>
> i use mina-sshd sftp to create a file system,and use filezilla to connect a 
> suselinux(version:11),but there was an error(If you don't pass my code, it 
> can connect successfully)
>  
> 2020-04-24 16:09:43.069 [WARN ] [sshd-SshServer[7b61bf11]-nio2-thread-3] 
> [org.apache.sshd.client.subsystem.sftp.impl.DefaultSftpClient::lambda$0] 
> [TxId:,SpanId:] onClose(ChannelSubsystem[id=0, 
> recipient=0]-ClientSessionImpl[etl@/88.0.62.70:22][sftp]) closed before 
> version negotiated
> Failed to create file system
> java.net.SocketTimeoutException: No incoming initialization response received 
> within 15000 msec.java.net.SocketTimeoutException: No incoming initialization 
> response received within 15000 msec. at 
> org.apache.sshd.client.subsystem.sftp.impl.DefaultSftpClient.init(DefaultSftpClient.java:369)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.subsystem.sftp.impl.DefaultSftpClient.(DefaultSftpClient.java:110)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.subsystem.sftp.impl.DefaultSftpClientFactory.createDefaultSftpClient(DefaultSftpClientFactory.java:67)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.subsystem.sftp.impl.DefaultSftpClientFactory.createSftpClient(DefaultSftpClientFactory.java:47)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.session.AbstractClientSession.createSftpClient(AbstractClientSession.java:355)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.subsystem.sftp.SftpFileSystem.getClient(SftpFileSystem.java:158)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.subsystem.sftp.SftpFileSystem.(SftpFileSystem.java:79)
>  ~[sshd-core.jar:1.7.0] at 
> com.shterm.text.sftp.ShtermSftpFileSystem.(SourceFile:38) 
> ~[shterm-text.jar:3.3.8] at 
> com.shterm.text.sftp.ShtermFileSystemFactory.a(SourceFile:175) 
> ~[shterm-text.jar:3.3.8] at 
> com.shterm.text.sftp.ShtermFileSystemFactory.createFileSystem(SourceFile:78) 
> ~[shterm-text.jar:3.3.8] at 
> org.apache.sshd.server.channel.ChannelSession.prepareCommand(ChannelSession.java:644)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.server.channel.ChannelSession.prepareChannelCommand(ChannelSession.java:580)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.server.channel.ChannelSession.handleSubsystem(ChannelSession.java:576)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.server.channel.ChannelSession.handleInternalRequest(ChannelSession.java:312)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.channel.AbstractChannel.handleUnknownChannelRequest(AbstractChannel.java:321)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.channel.AbstractChannel.handleChannelRequest(AbstractChannel.java:308)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.channel.AbstractChannel.handleRequest(AbstractChannel.java:270)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractConnectionService.channelRequest(AbstractConnectionService.java:517)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractConnectionService.process(AbstractConnectionService.java:341)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractSession.doHandleMessage(AbstractSession.java:614)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractSession.handleMessage(AbstractSession.java:547)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractSession.decode(AbstractSession.java:1498)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractSession.messageReceived(AbstractSession.java:508)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:66)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:301)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:281)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:278)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38)
>  ~[sshd-core.jar:1.7.0] at java.security.AccessController.doPrivileged(Native 
> Method) ~[?:1.8.0_231] at 
> 

[jira] [Commented] (SSHD-983) mina sshd create file system error

2020-04-26 Thread Lyor Goldstein (Jira)


[ 
https://issues.apache.org/jira/browse/SSHD-983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17092545#comment-17092545
 ] 

Lyor Goldstein commented on SSHD-983:
-

It does not look like a regular MINA-SSHD code used to create a file system but 
rather more like some reverse engineering that is trying to access only some 
select sections of the code rather than use it in a normal manner - so I don't 
think I can do much. That being said, a quick overview of the code shows the 
problem - the {{DefaultSftpClient}} constructor issues {{SSH_FXP_INIT}} and 
expects to receive a response with a valid version from the server - something 
that does not occur on time. Most likely, the code skipped some vital 
initialization that is usually executed by the regular code.

> mina sshd create file system error
> --
>
> Key: SSHD-983
> URL: https://issues.apache.org/jira/browse/SSHD-983
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 1.7.0
>Reporter: barry-gq
>Priority: Major
> Attachments: image-2020-04-26-11-14-30-914.png
>
>
> i use mina-sshd sftp to create a file system,and use filezilla to connect a 
> suselinux(version:11),but there was an error(If you don't pass my code, it 
> can connect successfully)
>  
> 2020-04-24 16:09:43.069 [WARN ] [sshd-SshServer[7b61bf11]-nio2-thread-3] 
> [org.apache.sshd.client.subsystem.sftp.impl.DefaultSftpClient::lambda$0] 
> [TxId:,SpanId:] onClose(ChannelSubsystem[id=0, 
> recipient=0]-ClientSessionImpl[etl@/88.0.62.70:22][sftp]) closed before 
> version negotiated
> Failed to create file system
> java.net.SocketTimeoutException: No incoming initialization response received 
> within 15000 msec.java.net.SocketTimeoutException: No incoming initialization 
> response received within 15000 msec. at 
> org.apache.sshd.client.subsystem.sftp.impl.DefaultSftpClient.init(DefaultSftpClient.java:369)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.subsystem.sftp.impl.DefaultSftpClient.(DefaultSftpClient.java:110)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.subsystem.sftp.impl.DefaultSftpClientFactory.createDefaultSftpClient(DefaultSftpClientFactory.java:67)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.subsystem.sftp.impl.DefaultSftpClientFactory.createSftpClient(DefaultSftpClientFactory.java:47)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.session.AbstractClientSession.createSftpClient(AbstractClientSession.java:355)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.subsystem.sftp.SftpFileSystem.getClient(SftpFileSystem.java:158)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.client.subsystem.sftp.SftpFileSystem.(SftpFileSystem.java:79)
>  ~[sshd-core.jar:1.7.0] at 
> com.shterm.text.sftp.ShtermSftpFileSystem.(SourceFile:38) 
> ~[shterm-text.jar:3.3.8] at 
> com.shterm.text.sftp.ShtermFileSystemFactory.a(SourceFile:175) 
> ~[shterm-text.jar:3.3.8] at 
> com.shterm.text.sftp.ShtermFileSystemFactory.createFileSystem(SourceFile:78) 
> ~[shterm-text.jar:3.3.8] at 
> org.apache.sshd.server.channel.ChannelSession.prepareCommand(ChannelSession.java:644)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.server.channel.ChannelSession.prepareChannelCommand(ChannelSession.java:580)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.server.channel.ChannelSession.handleSubsystem(ChannelSession.java:576)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.server.channel.ChannelSession.handleInternalRequest(ChannelSession.java:312)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.channel.AbstractChannel.handleUnknownChannelRequest(AbstractChannel.java:321)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.channel.AbstractChannel.handleChannelRequest(AbstractChannel.java:308)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.channel.AbstractChannel.handleRequest(AbstractChannel.java:270)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractConnectionService.channelRequest(AbstractConnectionService.java:517)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractConnectionService.process(AbstractConnectionService.java:341)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractSession.doHandleMessage(AbstractSession.java:614)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractSession.handleMessage(AbstractSession.java:547)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractSession.decode(AbstractSession.java:1498)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractSession.messageReceived(AbstractSession.java:508)
>  ~[sshd-core.jar:1.7.0] at 
> org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:66)
>  ~[sshd-core.jar:1.7.0] at 
>