Can not connect a Jenkins node - jenkins

An error occurs when I try to set up a Jenkins node. I am using Jenkins ver. 2.46. I am using ssh keys to authenticate the node.
Both master and node are Ubuntu 16.10, running 4.8.0-37-generic kernel and openjdk version "1.8.0_121"
err I get:
[02/18/17 13:09:57] [SSH] Opening SSH connection to 10.171.0.1:22.
[02/18/17 13:09:59] [SSH] Authentication successful.
[02/18/17 13:09:59] [SSH] The remote users environment is:
BASH=/bin/bash
BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_EXECUTION_STRING=set
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="3" [2]="46" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu")
BASH_VERSION='4.3.46(1)-release'
DIRSTACK=()
EUID=1004
GROUPS=()
HOME=/var/jenkins
HOSTNAME=wanda
HOSTTYPE=x86_64
IFS=$' \t\n'
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LOGNAME=jenkins
MACHTYPE=x86_64-pc-linux-gnu
MAIL=/var/mail/jenkins
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
PIPESTATUS=([0]="0")
PPID=22036
PS4='+ '
PWD=/var/jenkins
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments
SHLVL=1
SSH_CLIENT='10.144.72.139 33520 22'
SSH_CONNECTION='10.144.72.139 33520 10.171.0.1 22'
TERM=dumb
UID=1004
USER=jenkins
XDG_RUNTIME_DIR=/run/user/1004
XDG_SESSION_ID=116
_=']'
[02/18/17 13:09:59] [SSH] Checking java version of java
[02/18/17 13:10:00] [SSH] java -version returned 1.8.0_121.
[02/18/17 13:10:00] [SSH] Starting sftp client.
[02/18/17 13:10:01] [SSH] Copying latest slave.jar...
[02/18/17 13:10:05] [SSH] Copied 717,563 bytes.
Expanded the channel window size to 4MB
[02/18/17 13:10:05] [SSH] Starting slave process: cd "/var/jenkins" && java -jar slave.jar
<===[JENKINS REMOTING CAPACITY]===>channel started
Slave.jar version: 3.4.1
ERROR: Unexpected error in launching an agent. This is probably a bug in Jenkins
java.util.concurrent.CancellationException
at java.util.concurrent.FutureTask.report(FutureTask.java:121)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:767)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:262)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
hudson.util.IOException2: Slave start aborted.
at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:992)
at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:139)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:738)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:719)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at hudson.remoting.Request.call(Request.java:147)
at hudson.remoting.Channel.call(Channel.java:821)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:520)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:390)
at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:989)
... 7 more
ERROR: Connection terminated
java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2624)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3099)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:853)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:349)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)
Caused: java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:73)
Slave JVM has not reported exit code. Is it still running?
[02/18/17 13:10:08] [SSH] Connection closed.

I've entered too small value in advanced settings:
Connection Timeout in Seconds

Related

Unable to connect to Jenkins Agent after upgrade

Upgraded Jenkins from 2.257 to 2.339. After the upgrade none of the nodes are able to connect to the master. Jenkins is hosted on Amazon Linux. This is error I am getting when I try to connect a node to the controller:
Logs from Windows Agent :
SSHLauncher{host='172.*.*.*', port=22, credentialsId='3f7dbc2d-7850-4506-a356-24328ded5b43', jvmOptions='', javaPath='', prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=210, maxNumRetries=10, retryWaitTime=15, sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy, tcpNoDelay=true, trackCredentials=true}
[03/20/22 14:38:59] [SSH] Opening SSH connection to 172.*.*.*.
[03/20/22 14:38:59] [SSH] SSH host key matches key seen previously for this host. Connection will be allowed.
[03/20/22 14:38:59] [SSH] Authentication successful.
[03/20/22 14:38:59] [SSH] The remote user's environment is:
ALLUSERSPROFILE='C:\<some folder>'
ANDROID_HOME='C:\<some path>'
ANDROID_NDK_HOME='C:\<some path>'
APPDATA='C:\Users\<jenkis user>\AppData\Roaming'
BASH=/bin/bash
BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_EXECUTION_STRING=set
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="4" [2]="12" [3]="3" [4]="release" [5]="x86_64-unknown-cygwin")
BASH_VERSION='4.4.12(3)-release'
COMPUTERNAME=EC2AMAZ-ML17J1C
COMSPEC='C:\Windows\system32\cmd.exe'
CYGWIN=sshd
CYG_SYS_BASHRC=1
CommonProgramFiles='C:\Program Files\Common Files'
CommonProgramW6432='C:\Program Files\Common Files'
DIRSTACK=()
EUID=197608
GROUPS=()
GTK_BASEPATH='C:\Program Files (x86)\GtkSharp\2.12\'
HOME=/home/<some path>
HOMEDRIVE=C:
HOMEPATH='\cygwin64\home\<some path>'
HOSTNAME=someserver
HOSTTYPE=x86_64
IFS=$' \t\n'
JAVA_HOME='C:\Program Files\Java\jdk1.8.0_144'
LOCALAPPDATA='C:\Users\<somem user>\AppData\Local'
LOGNAME=<login user>
LOGONSERVER='\\someserver
M2_HOME='C:\apache-maven-3.3.9'
MACHTYPE=x86_64-unknown-cygwin
MAIL=/var/spool/mail//Jenkins
MAVEN_HOME='C:\apache-maven-3.3.9'
NUMBER_OF_PROCESSORS=4
OPTERR=1
OPTIND=1
OS=Windows_NT
OSTYPE=cygwin
PATH=''
PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
PIPESTATUS=([0]="0")
PPID=5896
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER='Intel64 Family 6 Model 85 Stepping 7, GenuineIntel'
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=5507
PROGRAMFILES='C:\Program Files'
PS4='+ '
PSModulePath='%ProgramFiles%\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\AWS Tools\PowerShell\'
PUBLIC='C:\Users\Public'
PWD=/home/<somepath>
ProgramData='C:\ProgramData'
ProgramW6432='C:\Program Files'
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments
SHLVL=1
SSH_AUTH_SOCK=/tmp/ssh-xQ6x4PUqHRF7/agent.34688
SSH_CLIENT='172.*.*.* 52306 22'
SSH_CONNECTION='172.*.*.* 52306 172.*.*.* 22'
SYSTEMDRIVE=C:
SYSTEMROOT='C:\Windows'
TERM=dumb
UID=197608
USER=<some user>
USERDOMAIN=someserver
USERNAME=<some user>
USERPROFILE='C:\Users\<some user>'
VS140COMNTOOLS='C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\'
WINDIR='C:\Windows'
_=
[03/20/22 14:38:59] [SSH] Checking java version of c:\<some path>/jdk/bin/java
Couldn't figure out the Java version of c:\<some path>/jdk/bin/java
bash: c:<some path>/jdk/bin/java: No such file or directory
[03/20/22 14:38:59] [SSH] Checking java version of java
[03/20/22 14:38:59] [SSH] java -version returned 1.8.0_191.
[03/20/22 14:38:59] [SSH] Starting sftp client.
[03/20/22 14:39:00] [SSH] Copying latest remoting.jar...
java.io.IOException: Could not copy remoting.jar into 'c:\<some path>' on agent
at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:702)
at hudson.plugins.sshslaves.SSHLauncher.access$300(SSHLauncher.java:113)
at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:445)
at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:412)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: invalid len argument
at com.trilead.ssh2.SFTPv3Client.read(SFTPv3Client.java:1232)
at com.trilead.ssh2.jenkins.SFTPClient$SFTPInputStream.read(SFTPClient.java:172)
at com.google.common.io.ByteStreams.toByteArrayInternal(ByteStreams.java:191)
at com.google.common.io.ByteStreams.toByteArray(ByteStreams.java:238)
at hudson.plugins.sshslaves.SSHLauncher.readInputStreamIntoByteArrayAndClose(SSHLauncher.java:760)
at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:671)
... 7 more
[03/20/22 14:39:00] Launch failed - cleaning up connection
[03/20/22 14:39:00] [SSH] Connection closed.
REST API
Jenkins 2.339
I have 3 different nodes (Windows, Ubuntu and mac). I get the same error on all three:
Caused by: java.lang.IllegalArgumentException: invalid len argument
Appreciate any info to resolve this.
Thanks
There is an open issue about your problem: https://issues.jenkins.io/browse/JENKINS-67258.
According to one of the participant of this issue, a solution is to:
[...] upgrading SSH Build Agents / SSH Slaves Plugin to version 1.32.0 and beyond [...]

Jenkins master fails to init a session to Windows 10 with OpenSSH

I have Windows 10 with installed latest beta of OpenSSH for windows. I am trying to use it as a slave for my Jenkins. This is the content of the log on the master:
[05/14/18 22:46:45] [SSH] Opening SSH connection to 10.10.10.10:22.
[05/14/18 22:46:45] [SSH] WARNING: SSH Host Keys are not being verified. Man-in-the-middle attacks may be possible against this connection.
[05/14/18 22:46:45] [SSH] Authentication successful.
[05/14/18 22:46:45] [SSH] The remote user's environment is:
....
[05/14/18 22:46:45] [SSH] Checking java version of java
[05/14/18 22:46:45] [SSH] java -version returned 1.8.0_151.
[05/14/18 22:46:45] [SSH] Starting sftp client.
[05/14/18 22:46:45] [SSH] Copying latest slave.jar...
[05/14/18 22:46:45] [SSH] Copied 762,466 bytes.
Expanded the channel window size to 4MB
[05/14/18 22:46:45] [SSH] Starting slave process: cd "C:\jenkins" && java -jar slave.jar -jar-cache "C:\jenkins\remoting\jarCache"
<===[JENKINS REMOTING CAPACITY]===><===[JENKINS REMOTING CAPACITY]===>ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
hudson.remoting.RequestAbortedException
Exception in thread "main" java.io.EOFException: unexpected stream termination
ERROR: Connection terminated
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:408) at hudson.remoting.Request.call(Request.java:176)
java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2671)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3146)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:858)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:354)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
Caused: java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)
at hudson.remoting.Channel.call(Channel.java:951)
at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:353) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:549)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:416)
at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:1110)
at hudson.plugins.sshslaves.SSHLauncher.access$500(SSHLauncher.java:148)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:845)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:820)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at hudson.remoting.Launcher.main(Launcher.java:743)
at hudson.remoting.Launcher.runWithStdinStdout(Launcher.java:691)
at hudson.remoting.Launcher.run(Launcher.java:373)[05/14/18 22:46:47] Launch failed - cleaning up connection
at hudson.remoting.Launcher.main(Launcher.java:283)
[05/14/18 22:46:47] [SSH] Connection closed.
So, ssh auth is successful, but for some reason starting the client jar fails. I am not sure what exactly I should check. Have anyone else had a struggle with Win 10 and OpenSSH?
Please see the comments in JENKINS-42856 and follow the instructions to configure OpenSSH
Test that you can run commands without tty by executing a command like this one
ssh USERNAME#AGENT_HOST /bin/bash -c ls

Configuration of a slave node in Jenkins with SSH agent

I have this error when I try to configure a slave node in Jenkins with SSH agent. How can I resolve this?
[11/07/17 13:13:05] [SSH] Checking java version of java
[11/07/17 13:13:05] [SSH] java -version returned 1.8.0_151.
[11/07/17 13:13:05] [SSH] Starting sftp client.
[11/07/17 13:13:05] [SSH] Remote file system root /home/Jenkins does not exist. Will try to create it...
java.io.IOException: Could not copy slave.jar into '/home/Jenkins' on slave
at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:1152)
at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:145)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:816)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Failed to mkdir /home/Jenkins
at hudson.plugins.sshslaves.SFTPClient.mkdirs(SFTPClient.java:83)
at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:1120)
... 7 more
Caused by: com.trilead.ssh2.SFTPException: Permission denied (SSH_FX_PERMISSION_DENIED: The user does not have sufficient permissions to perform the operation.)
at com.trilead.ssh2.SFTPv3Client.expectStatusOKMessage(SFTPv3Client.java:555)
at com.trilead.ssh2.SFTPv3Client.mkdir(SFTPv3Client.java:955)
at hudson.plugins.sshslaves.SFTPClient.mkdirs(SFTPClient.java:81)
... 8 more
[11/07/17 13:13:05] Launch failed - cleaning up connection
[11/07/17 13:13:05] [SSH] Connection closed.
It looks like you haven't set up the home directory for the user that you logged in as over ssh, and the /home directory is locked down so that user cannot create it (as it should be). You probably just need to create /home/jenkins on the slave machine with the appropriate permissions for the user running slave.jar.

I am using Jenkins ver. 1.640, and when I try to launch slave then i got this error

I am using ssh key pairs for launching the slaves.Someslaves are working fine. but someslaves when I try to "relaunch slave agent", then i got this error as below. OS :- Ubuntu 14.04LTS ,java version "1.7.0_65" on slave machine and on jenkins server machine java version "1.7.0_85".
Expanded the channel window size to 4MB
[01/22/16 07:41:12] [SSH] Starting slave process: cd "/home/tmp" && java -jar slave.jar
<===[JENKINS REMOTING CAPACITY]===>channel started
Slave.jar version: 2.53.2
This is a Unix slave
Evacuated stdout
Connection terminated
ERROR: Failed to install restarter
hudson.remoting.RequestAbortedException: hudson.remoting.Channel$OrderlyShutdown
at hudson.remoting.Request.abort(Request.java:297)
at hudson.remoting.Channel.terminate(Channel.java:847)
at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1080)
at hudson.remoting.Channel$1.handle(Channel.java:501)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)
at ......remote call to Mbox_19(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.Request.call(Request.java:172)
at hudson.remoting.Channel.call(Channel.java:780)
at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.install(JnlpSlaveRestarterInstaller.java:52)
at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.access$000(JnlpSlaveRestarterInstaller.java:33)
at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:39)
at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:36)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
Caused by: hudson.remoting.Channel$OrderlyShutdown
at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1080)
at hudson.remoting.Channel$1.handle(Channel.java:501)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)
Caused by: Command close created at
I hit the same problem and was able to fix it by re-downloading the slave.jar from the Jenkins master. Apparently during an upgrade something about the interface between master and slave had changed. You may want to try 're-installing' your slave configuration by re-downloading and updating your secret.

Getting error when launching Jenkins slave on Ubuntu 14.04 remotely

Error in Jenkins ver. 1.640, Ubuntu 14.04. This problem a lot of times in Jenkins, and can't resolve it. I get the following output
[01/22/16 07:35:31] [SSH] Checking java version of java
[01/22/16 07:35:36] [SSH] java -version returned 1.7.0_65.
[01/22/16 07:35:36] [SSH] Starting sftp client.
[01/22/16 07:35:40] [SSH] Copying latest slave.jar...
[01/22/16 07:41:10] [SSH] Copied 506,256 bytes.
Expanded the channel window size to 4MB
[01/22/16 07:41:12] [SSH] Starting slave process: cd "/home/tmp" && java -jar slave.jar
<===[JENKINS REMOTING CAPACITY]===>channel started
Slave.jar version: 2.53.2
This is a Unix slave
Evacuated stdout
Connection terminated
ERROR: Failed to install restarter
hudson.remoting.RequestAbortedException: hudson.remoting.Channel$OrderlyShutdown
at hudson.remoting.Request.abort(Request.java:297)
at hudson.remoting.Channel.terminate(Channel.java:847)
at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1080)
at hudson.remoting.Channel$1.handle(Channel.java:501)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)
at ......remote call to Mbox_19(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.Request.call(Request.java:172)
at hudson.remoting.Channel.call(Channel.java:780)
at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.install(JnlpSlaveRestarterInstaller.java:52)
at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.access$000(JnlpSlaveRestarterInstaller.java:33)
at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:39)
at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:36)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
Caused by: hudson.remoting.Channel$OrderlyShutdown
at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1080)
at hudson.remoting.Channel$1.handle(Channel.java:501)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)
Caused by: Command close created at
at hudson.remoting.Command.<init>(Command.java:56)
at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1074)
at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1072)
at hudson.remoting.Channel.close(Channel.java:1156)
at hudson.remoting.Channel.close(Channel.java:1138)
at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1079)
... 2 more
hudson.remoting.RequestAbortedException: hudson.remoting.Channel$OrderlyShutdown
at hudson.remoting.Request.abort(Request.java:297)
at hudson.remoting.Channel.terminate(Channel.java:847)
at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1080)
at hudson.remoting.Channel$1.handle(Channel.java:501)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)
at ......remote call to Mbox_19(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.Request.call(Request.java:172)
at hudson.remoting.Channel.call(Channel.java:780)
at org.jenkinsci.modules.launchd_slave_installer.SlaveInstallerFactoryImpl.createIfApplicable(SlaveInstallerFactoryImpl.java:30)
at org.jenkinsci.modules.slave_installer.SlaveInstallerFactory.createIfApplicable(SlaveInstallerFactory.java:29)
at org.jenkinsci.modules.slave_installer.SlaveInstallerFactory.createFor(SlaveInstallerFactory.java:46)
at org.jenkinsci.modules.slave_installer.impl.ComputerListenerImpl.onOnline(ComputerListenerImpl.java:30)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:573)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:381)
at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:945)
at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:133)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:711)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: hudson.remoting.Channel$OrderlyShutdown
at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1080)
at hudson.remoting.Channel$1.handle(Channel.java:501)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)
Caused by: Command close created at
at hudson.remoting.Command.<init>(Command.java:56)
at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1074)
at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1072)
at hudson.remoting.Channel.close(Channel.java:1156)
at hudson.remoting.Channel.close(Channel.java:1138)
at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1079)
... 2 more
[01/22/16 07:48:40] Launch failed - cleaning up connection
[01/22/16 07:48:40] [SSH] Connection closed.
Looks related to an existing Jenkins bug.
It seems this can be resolved by downgrading to kernel 3.4.x. Another possible fix is disabling TCP scatter-gather on the network interface.
Manage Jenkins -> Configure Global Security -> Tick check-box "Enable security",
then see "TCP port for JNLP slave agents" and select Random as option.

Resources