[jira] [Commented] (SSHD-340) Hanging threads
[ https://issues.apache.org/jira/browse/SSHD-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16492809#comment-16492809 ] Goldstein Lyor commented on SSHD-340: - Please make sure you call {{SshServer#stop}} > Hanging threads > --- > > Key: SSHD-340 > URL: https://issues.apache.org/jira/browse/SSHD-340 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 0.12.0 >Reporter: Sampo Savolainen >Priority: Major > Original Estimate: 1h > Remaining Estimate: 1h > > SSHD fails to stop properly due to errant threads. I've attached a thread > dump from a point of execution where everything should have been cleaned up. > The hanging threads happen only if the server has accepted connections and > they do not hang forever, they seem to stop themselves after a minute or so. > This might be an executor pool which is not shut down correctly. > Earlier versions (0.8.0 and 0.9.0) did not exhibit this behavior. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
Re: [VOTE] Release Mina SSHD 2.0.0
+1 >> I've staged a release of Mina SSHD 2.0.0 https://repository.apache.org/content/repositories/orgapachemina-1035/
[VOTE] Release Mina SSHD 2.0.0
I've staged a release of Mina SSHD 2.0.0 https://repository.apache.org/content/repositories/orgapachemina-1035/ Changelog: ** Bug * [SSHD-449] - SSH Exec channel with ClientChannel.Streaming.Async * [SSHD-640] - Streams are not flushed from SSH Command * [SSHD-721] - deadlock: all nio workers wait to be woken up * [SSHD-730] - Relative symbolic links with .. is not resolved properly by sftp readLink * [SSHD-786] - Clients can't authenticate after unexpected exception in Nio2Acceptor * [SSHD-795] - IOException (Broken pipe) on a socket local forwarding channel causes SSH client-server connection down * [SSHD-796] - AuthorizedKeyEntry parses `loginOptions` in a wrong way * [SSHD-799] - SSHD port forwarding. Missing SSH_MSG_CHANNEL_OPEN_FAILURE message if failed to open connection * [SSHD-800] - Numerous SSH_MSG_CHANNEL_FAILURE messages sent for SSH_MSG_CHANNEL_DATA on unknown channel * [SSHD-801] - SSHD port forwarding. Channel closed abruptly on remote socket error * [SSHD-802] - Listing directories using a RootedFileSystem returns non rooted paths * [SSHD-803] - SSHD port forwarding. Missing SSH_MSG_CHANNEL_EOF * [SSHD-807] - SFTP should accept empty owner/group value when setting attributes * [SSHD-813] - mina sshd 1.6.0, using as ssh server, run for about an hour,found that ssh client throws KeyExchange signature verification failed. ** New Feature * [SSHD-805] - RFC 8268 support * [SSHD-806] - Split mina io support in its own module * [SSHD-812] - support asynchronous mode for sftp subsystem * [SSHD-815] - Extract SFTP support in its own module * [SSHD-817] - Support for netty i/o provider * [SSHD-821] - Support for async authentication ** Improvement * [SSHD-712] - Break up sshd-core artifact into several smaller ones * [SSHD-797] - Provide SSHD-based JGIT TransportProtocol implementation(s) * [SSHD-798] - Improve GitPackCommand code to be more flexible * [SSHD-808] - Run client/server unit tests with MINA IO * [SSHD-814] - enrich the SftpEventListener * [SSHD-816] - Provide some way for the SSHD command line server to detect and configure the (split) SFTP subsystem * [SSHD-818] - Split SCP code (client + server) to its own module * [SSHD-819] - Add automatic detection of other {{CommandFactory}}-ies in SSH Server * [SSHD-820] - Add provision to override default {{ShellFactory}} in SSH server * [SSHD-825] - Add support for non-chrooted SFTP users with a virtual filesystem * [SSHD-826] - Ability to configure the sftp home directory more easily ** Task * [SSHD-824] - Do not use anonymous inner classes to initialize collections Please review and vote ! Cheers, Guillaume Nodet -- Guillaume Nodet
[jira] [Closed] (SSHD-418) Upgrade to mina 3
[ https://issues.apache.org/jira/browse/SSHD-418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet closed SSHD-418. Resolution: Won't Fix Mina 3 development has stopped since a few years, so I'm closing this issue. > Upgrade to mina 3 > - > > Key: SSHD-418 > URL: https://issues.apache.org/jira/browse/SSHD-418 > Project: MINA SSHD > Issue Type: Improvement >Reporter: Guillaume Nodet >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SSHD-824) Do not use anonymous inner classes to initialize collections
[ https://issues.apache.org/jira/browse/SSHD-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet resolved SSHD-824. -- Resolution: Fixed > Do not use anonymous inner classes to initialize collections > > > Key: SSHD-824 > URL: https://issues.apache.org/jira/browse/SSHD-824 > Project: MINA SSHD > Issue Type: Task >Reporter: Guillaume Nodet >Assignee: Guillaume Nodet >Priority: Major > Fix For: 2.0.0 > > > This is an abuse of the Object model. > If needed, introduce a collection builder, especially for immutable > collections. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SSHD-824) Do not use anonymous inner classes to initialize collections
[ https://issues.apache.org/jira/browse/SSHD-824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16492533#comment-16492533 ] Guillaume Nodet commented on SSHD-824: -- I didn't want to spend too much time on writing a builder api to create collections, so I just used static blocks when the construction could not be done in a single statement. https://github.com/apache/mina-sshd/commit/3c6bfab46d08e87b195d5d7f72cb940eeedda495 > Do not use anonymous inner classes to initialize collections > > > Key: SSHD-824 > URL: https://issues.apache.org/jira/browse/SSHD-824 > Project: MINA SSHD > Issue Type: Task >Reporter: Guillaume Nodet >Assignee: Guillaume Nodet >Priority: Major > Fix For: 2.0.0 > > > This is an abuse of the Object model. > If needed, introduce a collection builder, especially for immutable > collections. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SSHD-825) Add support for non-chrooted SFTP users with a virtual filesystem
[ https://issues.apache.org/jira/browse/SSHD-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet resolved SSHD-825. -- Resolution: Fixed > Add support for non-chrooted SFTP users with a virtual filesystem > - > > Key: SSHD-825 > URL: https://issues.apache.org/jira/browse/SSHD-825 > Project: MINA SSHD > Issue Type: Improvement >Affects Versions: 1.7.0 >Reporter: Quinn Stevenson >Assignee: Guillaume Nodet >Priority: Minor > Fix For: 2.0.0 > > > When the SshServer is configured for SFTP with a VirtualFileSystemFactory, > the user is always chrooted to either the defaultHomeDir or the specific > homeDir for the user. > However, in order to simulate systems that are configured such that users are > not chrooted, there should be a way to configure the system with a virtual > root and a home directory for the use in that virtual root that is also the > initial directory for the user when they login. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SSHD-824) Do not use anonymous inner classes to initialize collections
[ https://issues.apache.org/jira/browse/SSHD-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet updated SSHD-824: - Fix Version/s: 2.0.0 > Do not use anonymous inner classes to initialize collections > > > Key: SSHD-824 > URL: https://issues.apache.org/jira/browse/SSHD-824 > Project: MINA SSHD > Issue Type: Task >Reporter: Guillaume Nodet >Assignee: Guillaume Nodet >Priority: Major > Fix For: 2.0.0 > > > This is an abuse of the Object model. > If needed, introduce a collection builder, especially for immutable > collections. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SSHD-824) Do not use anonymous inner classes to initialize collections
[ https://issues.apache.org/jira/browse/SSHD-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet reassigned SSHD-824: Assignee: Guillaume Nodet > Do not use anonymous inner classes to initialize collections > > > Key: SSHD-824 > URL: https://issues.apache.org/jira/browse/SSHD-824 > Project: MINA SSHD > Issue Type: Task >Reporter: Guillaume Nodet >Assignee: Guillaume Nodet >Priority: Major > Fix For: 2.0.0 > > > This is an abuse of the Object model. > If needed, introduce a collection builder, especially for immutable > collections. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SSHD-340) Hanging threads
[ https://issues.apache.org/jira/browse/SSHD-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16492475#comment-16492475 ] Ivan Krizsan commented on SSHD-340: --- I am seing hung threads after tests using SshServer in version 1.7.0 with the result that a server instance does not shut down property, causing a "port already in use" error when subsequent test is trying to create a new server. After having switched to version 0.10.0 the issues are resolved and the server instances shut down properly. > Hanging threads > --- > > Key: SSHD-340 > URL: https://issues.apache.org/jira/browse/SSHD-340 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 0.12.0 >Reporter: Sampo Savolainen >Priority: Major > Original Estimate: 1h > Remaining Estimate: 1h > > SSHD fails to stop properly due to errant threads. I've attached a thread > dump from a point of execution where everything should have been cleaned up. > The hanging threads happen only if the server has accepted connections and > they do not hang forever, they seem to stop themselves after a minute or so. > This might be an executor pool which is not shut down correctly. > Earlier versions (0.8.0 and 0.9.0) did not exhibit this behavior. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SSHD-449) SSH Exec channel with ClientChannel.Streaming.Async
[ https://issues.apache.org/jira/browse/SSHD-449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet resolved SSHD-449. -- Resolution: Fixed > SSH Exec channel with ClientChannel.Streaming.Async > > > Key: SSHD-449 > URL: https://issues.apache.org/jira/browse/SSHD-449 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 0.14.0 >Reporter: Yarin Benado >Assignee: Guillaume Nodet >Priority: Critical > Fix For: 2.0.0 > > > It looks like there is an issue with combining exec channel with > ClientChannel.Streaming.Async. > You cannot use the channel.gerAsyncOut() to add a listener to it before the > channel is opened, therefore open() call on the channel will fire the command > to the server, and response might arrive before there are any listeners > attached. > If a listener is not attached in-time (in the test below even 100 millis are > suffice to cause it to miss the registration) the channel simply returns an > empty output on the stream. > Here is a test added in ClientTest.java that reproduces the problem: > {code} > @Test > public void testExecAsyncClient() throws Exception { > client.start(); > ClientSession session = client.connect("smx", "localhost", > port).await().getSession(); > session.addPasswordIdentity("smx"); > session.auth().verify(); > final ByteArrayOutputStream baosOut = new ByteArrayOutputStream(); > final ByteArrayOutputStream baosErr = new ByteArrayOutputStream(); > final ChannelExec channel = session.createExecChannel("test"); > channel.setStreaming(ClientChannel.Streaming.Async); > OpenFuture open = channel.open(); > > Thread.sleep(100); // Removing this line will make the test succeed > open.addListener(new SshFutureListener() { > public void operationComplete(OpenFuture future) { > channel.getAsyncOut().read(new Buffer()) > .addListener(new SshFutureListener() { > public void operationComplete(IoReadFuture future) { > try { > future.verify(); > Buffer buffer = future.getBuffer(); > baosOut.write(buffer.array(), buffer.rpos(), > buffer.available()); > buffer.rpos(buffer.rpos() + > buffer.available()); > buffer.compact(); > > channel.getAsyncOut().read(buffer).addListener(this); > } catch (IOException e) { > if (!channel.isClosing()) { > e.printStackTrace(); > channel.close(true); > } > } > } > }); > channel.getAsyncErr().read(new Buffer()) > .addListener(new SshFutureListener() { > public void operationComplete(IoReadFuture future) { > try { > future.verify(); > Buffer buffer = future.getBuffer(); > baosErr.write(buffer.array(), buffer.rpos(), > buffer.available()); > buffer.rpos(buffer.rpos() + > buffer.available()); > buffer.compact(); > > channel.getAsyncErr().read(buffer).addListener(this); > } catch (IOException e) { > if (!channel.isClosing()) { > e.printStackTrace(); > channel.close(true); > } > } > } > }); > } > }); > channel.waitFor(ClientChannel.CLOSED, 0); > assertFalse(baosErr.size() == 0); > client.close(true); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SSHD-712) Break up sshd-core artifact into several smaller ones
[ https://issues.apache.org/jira/browse/SSHD-712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet updated SSHD-712: - Fix Version/s: 2.0.0 > Break up sshd-core artifact into several smaller ones > - > > Key: SSHD-712 > URL: https://issues.apache.org/jira/browse/SSHD-712 > Project: MINA SSHD > Issue Type: Improvement >Affects Versions: 1.4.0 >Reporter: Goldstein Lyor >Priority: Major > Fix For: 2.0.0 > > > - We could probably extract some of the generic classes into an _sshd-utils_ > artifact. > - Perhaps some of the general SSHD related classes (e.g., _Channel_, > _Session_, _Signature_) into _sshd-common_ artifact. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SSHD-712) Break up sshd-core artifact into several smaller ones
[ https://issues.apache.org/jira/browse/SSHD-712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet resolved SSHD-712. -- Resolution: Fixed > Break up sshd-core artifact into several smaller ones > - > > Key: SSHD-712 > URL: https://issues.apache.org/jira/browse/SSHD-712 > Project: MINA SSHD > Issue Type: Improvement >Affects Versions: 1.4.0 >Reporter: Goldstein Lyor >Priority: Major > Fix For: 2.0.0 > > > - We could probably extract some of the generic classes into an _sshd-utils_ > artifact. > - Perhaps some of the general SSHD related classes (e.g., _Channel_, > _Session_, _Signature_) into _sshd-common_ artifact. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SSHD-449) SSH Exec channel with ClientChannel.Streaming.Async
[ https://issues.apache.org/jira/browse/SSHD-449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet updated SSHD-449: - Fix Version/s: 2.0.0 > SSH Exec channel with ClientChannel.Streaming.Async > > > Key: SSHD-449 > URL: https://issues.apache.org/jira/browse/SSHD-449 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 0.14.0 >Reporter: Yarin Benado >Assignee: Guillaume Nodet >Priority: Critical > Fix For: 2.0.0 > > > It looks like there is an issue with combining exec channel with > ClientChannel.Streaming.Async. > You cannot use the channel.gerAsyncOut() to add a listener to it before the > channel is opened, therefore open() call on the channel will fire the command > to the server, and response might arrive before there are any listeners > attached. > If a listener is not attached in-time (in the test below even 100 millis are > suffice to cause it to miss the registration) the channel simply returns an > empty output on the stream. > Here is a test added in ClientTest.java that reproduces the problem: > {code} > @Test > public void testExecAsyncClient() throws Exception { > client.start(); > ClientSession session = client.connect("smx", "localhost", > port).await().getSession(); > session.addPasswordIdentity("smx"); > session.auth().verify(); > final ByteArrayOutputStream baosOut = new ByteArrayOutputStream(); > final ByteArrayOutputStream baosErr = new ByteArrayOutputStream(); > final ChannelExec channel = session.createExecChannel("test"); > channel.setStreaming(ClientChannel.Streaming.Async); > OpenFuture open = channel.open(); > > Thread.sleep(100); // Removing this line will make the test succeed > open.addListener(new SshFutureListener() { > public void operationComplete(OpenFuture future) { > channel.getAsyncOut().read(new Buffer()) > .addListener(new SshFutureListener() { > public void operationComplete(IoReadFuture future) { > try { > future.verify(); > Buffer buffer = future.getBuffer(); > baosOut.write(buffer.array(), buffer.rpos(), > buffer.available()); > buffer.rpos(buffer.rpos() + > buffer.available()); > buffer.compact(); > > channel.getAsyncOut().read(buffer).addListener(this); > } catch (IOException e) { > if (!channel.isClosing()) { > e.printStackTrace(); > channel.close(true); > } > } > } > }); > channel.getAsyncErr().read(new Buffer()) > .addListener(new SshFutureListener() { > public void operationComplete(IoReadFuture future) { > try { > future.verify(); > Buffer buffer = future.getBuffer(); > baosErr.write(buffer.array(), buffer.rpos(), > buffer.available()); > buffer.rpos(buffer.rpos() + > buffer.available()); > buffer.compact(); > > channel.getAsyncErr().read(buffer).addListener(this); > } catch (IOException e) { > if (!channel.isClosing()) { > e.printStackTrace(); > channel.close(true); > } > } > } > }); > } > }); > channel.waitFor(ClientChannel.CLOSED, 0); > assertFalse(baosErr.size() == 0); > client.close(true); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SSHD-449) SSH Exec channel with ClientChannel.Streaming.Async
[ https://issues.apache.org/jira/browse/SSHD-449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet reassigned SSHD-449: Assignee: Guillaume Nodet > SSH Exec channel with ClientChannel.Streaming.Async > > > Key: SSHD-449 > URL: https://issues.apache.org/jira/browse/SSHD-449 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 0.14.0 >Reporter: Yarin Benado >Assignee: Guillaume Nodet >Priority: Critical > Fix For: 2.0.0 > > > It looks like there is an issue with combining exec channel with > ClientChannel.Streaming.Async. > You cannot use the channel.gerAsyncOut() to add a listener to it before the > channel is opened, therefore open() call on the channel will fire the command > to the server, and response might arrive before there are any listeners > attached. > If a listener is not attached in-time (in the test below even 100 millis are > suffice to cause it to miss the registration) the channel simply returns an > empty output on the stream. > Here is a test added in ClientTest.java that reproduces the problem: > {code} > @Test > public void testExecAsyncClient() throws Exception { > client.start(); > ClientSession session = client.connect("smx", "localhost", > port).await().getSession(); > session.addPasswordIdentity("smx"); > session.auth().verify(); > final ByteArrayOutputStream baosOut = new ByteArrayOutputStream(); > final ByteArrayOutputStream baosErr = new ByteArrayOutputStream(); > final ChannelExec channel = session.createExecChannel("test"); > channel.setStreaming(ClientChannel.Streaming.Async); > OpenFuture open = channel.open(); > > Thread.sleep(100); // Removing this line will make the test succeed > open.addListener(new SshFutureListener() { > public void operationComplete(OpenFuture future) { > channel.getAsyncOut().read(new Buffer()) > .addListener(new SshFutureListener() { > public void operationComplete(IoReadFuture future) { > try { > future.verify(); > Buffer buffer = future.getBuffer(); > baosOut.write(buffer.array(), buffer.rpos(), > buffer.available()); > buffer.rpos(buffer.rpos() + > buffer.available()); > buffer.compact(); > > channel.getAsyncOut().read(buffer).addListener(this); > } catch (IOException e) { > if (!channel.isClosing()) { > e.printStackTrace(); > channel.close(true); > } > } > } > }); > channel.getAsyncErr().read(new Buffer()) > .addListener(new SshFutureListener() { > public void operationComplete(IoReadFuture future) { > try { > future.verify(); > Buffer buffer = future.getBuffer(); > baosErr.write(buffer.array(), buffer.rpos(), > buffer.available()); > buffer.rpos(buffer.rpos() + > buffer.available()); > buffer.compact(); > > channel.getAsyncErr().read(buffer).addListener(this); > } catch (IOException e) { > if (!channel.isClosing()) { > e.printStackTrace(); > channel.close(true); > } > } > } > }); > } > }); > channel.waitFor(ClientChannel.CLOSED, 0); > assertFalse(baosErr.size() == 0); > client.close(true); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)