Unable to start agent node in Jenkins

10.1k views Asked by At

Unable to start agent node in Jenkins.

Master machine showing error exception in log file.

[12/01/14 16:21:44] [SSH] Opening SSH connection to 

10.0.11.120:22.
Connection refused: connect
ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
java.lang.IllegalStateException: Connection is not established!
    at com.trilead.ssh2.Connection.getRemainingAuthMethods(Connection.java:1030)
    at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPasswordAuthenticator.canAuthenticate(TrileadSSHPasswordAuthenticator.java:82)
    at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:207)
    at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:169)
    at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1173)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:701)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
[12/01/14 16:21:45] Launch failed - cleaning up connection
[12/01/14 16:21:45] [SSH] Connection closed.

[12/01/14 16:23:44] [SSH] Opening SSH connection to 10.0.11.120:22.
5

There are 5 answers

2
Deepak On

If your slave machine is Mac then Go to System Preferences -> Sharing and enable Remote Login then try again.

0
tarantoga On

I suspect that you need to install the Java Cryptography Extension for your JVM. Without that the RSA key size is limited and authentication is not being established.

See https://issues.jenkins-ci.org/browse/JENKINS-26495 for more details.

0
user3642219 On

I had this problem and resolved it by replacing the IP address with the host name.

0
elhostis On

I had this problem too. I have trace the log of the slave.

tail -f /var/log/*.log

And I have seen this message.

Sep 20 14:51:43 clicrdv.aws-eu-west-01.batch-01.adm sshd[1035]: fatal: no matching mac found: client hmac-sha1-96,hmac-sha1,hmac-md5-96,hmac-md5 server hmac-sha2-512,hmac-sha2-256,hmac-ripemd160 [preauth]

Then, I have deleted this line in /etc/ssh/sshd_config

#MACs hmac-sha2-512,hmac-sha2-256,hmac-ripemd160

And restart ssh. Then no problem at all.

Eric

2
rundekugel On