-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
-
sshd-plugin:3.237.v883d165a_c1d3
CLI Commands that close the stdout (OutputStream) hang forever or sometimes show the following warning when using SSH:
org.apache.sshd.common.SshException: flush(ChannelOutputStream[ChannelSession[id=0, recipient=0]-ServerSessionImpl[admin@/127.0.0.1:61179]] SSH_MSG_CHANNEL_DATA) length=0 - stream is already closed at org.apache.sshd.common.channel.ChannelOutputStream.flush(ChannelOutputStream.java:169) at org.jenkinsci.main.modules.sshd.AsynchronousCommand$1.run(AsynchronousCommand.java:114) at java.lang.Thread.run(Thread.java:748)
For example the export-configuration command of the Configuration as Code plugin.
java -jar jenkins-cli.jar -s http://allan.cje.com:8081/ -user admin -ssh export-configuration
Or
ssh -l admin -p 2222 allan.cje.com export-configuration
Most likely caused by a bug in SSHD Core and upstream with https://issues.apache.org/jira/browse/SSHD-1257. That will be fixed in SSHD Core 2.9.0, currently unreleased.
Though maybe a wrapper in CLICommand could prevent closure of the stdout.
- links to