首页 文章

使用SSH代理在Jenkins中配置从属节点

提问于
浏览
0

当我尝试使用SSH代理在Jenkins中配置从属节点时出现此错误 . 我该如何解决这个问题?

[11/07/17 13:13:05] [SSH] Checking java version of java
[11/07/17 13:13:05] [SSH] java -version returned 1.8.0_151.
[11/07/17 13:13:05] [SSH] Starting sftp client.
[11/07/17 13:13:05] [SSH] Remote file system root /home/Jenkins does not exist. Will try to create it...
java.io.IOException: Could not copy slave.jar into '/home/Jenkins' on slave
    at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:1152)
    at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:145)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:816)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Failed to mkdir /home/Jenkins
    at hudson.plugins.sshslaves.SFTPClient.mkdirs(SFTPClient.java:83)
    at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:1120)
    ... 7 more
Caused by: com.trilead.ssh2.SFTPException: Permission denied (SSH_FX_PERMISSION_DENIED: The user does not have sufficient permissions to perform the operation.)
    at com.trilead.ssh2.SFTPv3Client.expectStatusOKMessage(SFTPv3Client.java:555)
    at com.trilead.ssh2.SFTPv3Client.mkdir(SFTPv3Client.java:955)
    at hudson.plugins.sshslaves.SFTPClient.mkdirs(SFTPClient.java:81)
    ... 8 more
[11/07/17 13:13:05] Launch failed - cleaning up connection
[11/07/17 13:13:05] [SSH] Connection closed.

1 回答

  • 0

    看起来您没有为通过ssh登录的用户设置主目录,并且 /home 目录被锁定,因此用户无法创建它(应该如此) . 您可能只需要在从属计算机上创建 /home/jenkins ,并为运行slave.jar的用户提供适当的权限 .

相关问题