Jenkins master正在亚马逊实例上运行,奴隶机器在专用的Soyoustart机器上运行.工作正常,直到需要重做从设置:重新安装操作系统,安装Java,添加主设备密钥到slave authorized_keys并删除/添加主设备known_hosts中的从设备.为从属设置新凭据并在Jenkins主服务器中配置节点,但无法连接到从属服务器.
设置与现在一样,并且一直与其他从站一起工作而没有打嗝.唯一不同的是,这次新的奴隶与旧的奴隶是同一台机器.
可以从CLI从主服务器ssh到从服务器(替换文件名和从属IP与此帖子的占位符):
$ ssh -i <key-file> jenkins@<slave-ip>
已设置凭据:

节点配置为:

连接到从站时的输出:
[05/17/15 07:30:31] [SSH] Opening SSH connection to <slave-ip>.
Key exchange was not finished, connection is closed.
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.TrileadSSHPublicKeyAuthenticator.getRemainingAuthMethods(TrileadSSHPublicKeyAuthenticator.java:88)
at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPublicKeyAuthenticator.canAuthenticate(TrileadSSHPublicKeyAuthenticator.java:80)
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.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)
[05/17/15 07:30:31] Launch failed - cleaning up connection …Run Code Online (Sandbox Code Playgroud)