我想将一个奴隶连接到Master-Jenkins,但是在尝试连接时我得到了以下错误:
[05/02/18 15:26:59] [SSH] Opening SSH connection to <IP>
Key exchange was not finished, connection is closed.
java.io.IOException: There was a problem while connecting to <IP>:22
at com.trilead.ssh2.Connection.connect(Connection.java:818)
at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1324)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:831)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Key exchange was not finished, connection is closed.
at com.trilead.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:93)
at com.trilead.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:230)
at com.trilead.ssh2.Connection.connect(Connection.java:770)
... 7 more
Caused by: java.io.IOException: Cannot negotiate, proposals do not match.
at com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:405)
at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:777)
at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:489)
... 1 more
[05/02/18 15:26:59] Launch failed - cleaning up connection
[05/02/18 15:26:59] [SSH] Connection closed.
节点配置: - Start-Method:通过SSH启动Slave - 主机名:是IP - 访问数据:我为SSH Access创建的用户 - &gt;公钥在Slave Node
上的授权密钥中如果我作为用户“jenkins”在我的主人身上并且做ssh jenkins@<IP>
我可以登录没有问题(公钥在奴隶上)。
为什么它对“UI-Jenkins”不起作用。
Jenkins-Version:1.658
节点:Ubuntu 14.04
SSH-Slave插件:1.26
答案 0 :(得分:1)
那&#34;解决了#34;问题:
&#34;解决方法是在Jenkins Slave的/ etc / ssh / sshd_config中注释掉MAC和KexAlgorithm行并重新启动sshd(在Ubuntu上重启服务ssh)
更新:问题已于2017-04-29&#34;
解决答案 1 :(得分:0)
在目标节点上执行此命令。
sudo -i su -c'sed -i -e“ s / MACs / MACs hmac-sha1,/ g” / etc / ssh / sshd_config;服务sshd重新启动”
答案 2 :(得分:0)
我想将我的经验投入到这个线程中:我的环境有Windows主服务器以及混合的Windows和Linux代理。即使Master将'jenkins-agent'和其他支持文件推送到该代理,一个Windows代理仍拒绝连接到master。
此代理安装了6个不同版本的JDK和JRE。我卸载了所有它们,仅重新安装了我们需要的最新JDK,并设置了JAVA_HOME。这解决了连接问题。