加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – Jenkins SSH slave无法创建/ home // jenkins

发布时间:2020-12-13 23:26:01 所属栏目:Linux 来源:网络整理
导读:在Jenkins上配置ssh slave时,它在ec2实例上运行,当我点击“Launch Slave Agent”时,我收到以下错误消息. [08/06/14 18:41:46] [SSH] Opening SSH connection to ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:22.[08/06/14 18:41:46] [SSH] Authenticati
在Jenkins上配置ssh slave时,它在ec2实例上运行,当我点击“Launch Slave Agent”时,我收到以下错误消息.

[08/06/14 18:41:46] [SSH] Opening SSH connection to ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:22.
[08/06/14 18:41:46] [SSH] Authentication successful.
[08/06/14 18:41:46] [SSH] The remote users environment is:
[08/06/14 18:41:46] [SSH] Starting sftp client.
[08/06/14 18:41:46] [SSH] SFTP failed. Copying via SCP.
[08/06/14 18:41:46] [SSH] Remote file system root /home/<user>/jenkins does not exist. Will try to create it...
Failed to create /home/<user>/jenkins
[08/06/14 18:41:46] [SSH] Copying latest slave.jar...
hudson.util.IOException2: Could not copy slave.jar into '/home/<user>/jenkins' on slave
    at hudson.plugins.sshslaves.SSHLauncher.copySlaveJarUsingSCP(SSHLauncher.java:967)
    at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:926)
    at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:596)
    at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:228)
    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:744)
Caused by: java.io.IOException: Error during SCP transfer.
    at com.trilead.ssh2.SCPClient.put(SCPClient.java:523)
    at hudson.plugins.sshslaves.SSHLauncher.copySlaveJarUsingSCP(SSHLauncher.java:965)
    ... 7 more
Caused by: java.io.IOException: Remote scp terminated unexpectedly.
    at com.trilead.ssh2.SCPClient.readResponse(SCPClient.java:50)
    at com.trilead.ssh2.SCPClient.sendBytes(SCPClient.java:140)
    at com.trilead.ssh2.SCPClient.put(SCPClient.java:519)
    ... 8 more
[08/06/14 18:41:46] [SSH] Connection closed.

此节点的Jenkins配置如下:

请注意我已经设置了JavaPath属性,因为Jenkins“无法弄清楚java的Java版本”(这是我得到的错误消息)

知道如何解决这个问题吗?谢谢

解决方法

我有同样的问题.阅读以下文章 talking about new version后,在我正在使用的SSH插件上发现了一些错误.

所以我访问了管理插件 – >已安装 – >搜索’SSH'(通过删除选择禁用SSH相关客户端)
基本上你需要:

>已禁用 – SSH Slaves插件(可能是Jenkins附带)
>添加了SSH插件(版本2.4).

这解决了这个问题,我已经在步骤6,JENKINS-SETTING UP MASTER SLAVE ENVIRONMENT的本文档中显示的其他设置之后成功连接了.(slave.jar -jnlpUrl ….)希望这将有助于将来的某些人.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读