Jenkins master无法通过SSH连接到slave

Tan*_*Mae 6 jenkins jenkins-plugins

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
[05/17/15 07:30:31] [SSH] Connection closed.
Run Code Online (Sandbox Code Playgroud)

版本号:

  • 詹金斯1.613
  • SSH凭证插件1.11
  • SSH Slaves插件1.9

对于那些喜欢挖掘代码的人:

我错过了一些明显的东西吗?可能是什么导致了这个?任何已知的解决方法?或者它看起来像需要报告的错误?

如果需要更多信息,请告诉我.

akh*_*khy 6

我正在使用使用OpenJDK8的官方Docker镜像运行Jenkins master,不需要安装JCE.

显然这是Jenkins/SSH安全性中尚未解决的问题.

我现在的解决方法是通过注释掉MACs,并KexAlgorithm在线路/etc/ssh/sshd_config詹金斯从和重新启动的sshd(service ssh restart在Ubuntu)


更新:问题已于2017-04-29解决


tar*_*oga 2

我怀疑您需要为您的 JVM 安装 Java Cryptography Extension。否则,RSA 密钥大小就会受到限制,并且无法建立身份验证。

有关更多详细信息,请参阅https://issues.jenkins-ci.org/browse/JENKINS-26495 。

  • 你可能错过了我说它与其他奴隶连接良好的部分。 (2认同)