Jenkins中具有SSH代理的权限从属节点

时间:2019-01-11 07:25:33

标签: jenkins ssh jenkins-slave

当我尝试使用SSH代理在Jenkins中配置从属节点时出现此错误。我正在尝试连接我的kvm来宾。我该如何解决

 [01/10/19 18:37:29] [SSH] Checking java version of /var/lib/jenkins/jdk/bin/java
    Couldn't figure out the Java version of /var/lib/jenkins/jdk/bin/java
    bash: /var/lib/jenkins/jdk/bin/java: No such file or directory

    [01/10/19 18:37:29] [SSH] Checking java version of java
    [01/10/19 18:37:29] [SSH] java -version returned 1.8.0_191.
    [01/10/19 18:37:29] [SSH] Starting sftp client.
    [01/10/19 18:37:29] [SSH] Copying latest remoting.jar...
    java.io.IOException: Could not copy remoting.jar into '/var/lib/jenkins' on agent
        at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:1109)
        at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:128)
        at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:866)
        at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:833)
        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: Could not copy remoting.jar to '/var/lib/jenkins/remoting.jar' on agent
        at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:1104)
        ... 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.openFile(SFTPv3Client.java:1201)
        at com.trilead.ssh2.SFTPv3Client.createFile(SFTPv3Client.java:1074)
        at com.trilead.ssh2.SFTPv3Client.createFile(SFTPv3Client.java:1055)
        at com.trilead.ssh2.jenkins.SFTPClient.writeToFile(SFTPClient.java:103)
        at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:1097)
        ... 7 more
    [01/10/19 18:37:29] Launch failed - cleaning up connection
    [01/10/19 18:37:29] [SSH] Connection closed

.

0 个答案:

没有答案