【发布时间】:2015-07-28 21:22:10
【问题描述】:
Jenkins master 运行在 Amazon 实例上,slave 机器设置在专用的 Soyoustart 机器上。工作正常,直到需要重做从属设置:重新安装操作系统,安装 Java,将主密钥添加到从授权_keys 并再次删除/添加从已知主机中的从属。为从站设置新凭据并在 Jenkins 主站中配置节点,但无法连接到从站。
设置与其他从站的设置相同,并且一直在与其他从站一起工作而没有打嗝。唯一不同的是,这一次新的从机是同一台机器,其 IP 与旧机器相同。
可以通过 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
[05/17/15 07:30:31] [SSH] Connection closed.
版本号:
- 詹金斯 1.613
- SSH 凭据插件 1.11
- SSH 从站插件 1.9
对于那些喜欢深入研究代码的人:
我在这里遗漏了一些明显的东西吗?这可能是什么原因造成的?任何已知的解决方法?还是看起来像是需要报告的错误?
如果需要更多信息,请告诉我。
【问题讨论】:
-
我遇到了完全相同的问题。你修好了吗?我正在使用 Jenkins 2.46.1。
-
从来没有解决这个问题。我只是最终没有使用那个特定的奴隶。
-
这个问题是出现在这个特定的从机还是整个 Mac 环境中?