gpt4 book ai didi

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

转载 作者:IT王子 更新时间:2023-10-29 00:40:34 29 4
gpt4 key购买 nike

在运行在 ec2 实例上的 Jenkins 上配置 ssh 从站时,单击“启动从站代理”时收到以下错误消息。

[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 配置如下:

Jenkins Config

请注意,我已经设置了 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 ....)
希望这会在将来帮助某人。

关于linux - Jenkins SSH slave 无法创建/home/<user>/jenkins,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25177321/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com