2015-06-25 15 views
0

我不确定配置Jenkins主要将这些作业构建/部署到新的从属设备的正确步骤,以及如何设置新的奴隶,但它是一个错误。例如,我是否需要在新的slave上安装任何东西,或者做任何类型的setup/config? & 我正在Ubuntu操作系统上进行配置。此节点处于脱机状态,因为Jenkins未能启动它的奴隶代理

just before slave node1 gets launched ... 
    executing pre-launch scripts ... 
    [06/25/15 13:06:55] [SSH] Opening SSH connection to 192.168.4.153:22. 
    ERROR: Server rejected the 1 private key(s) for jenkins (credentialId:fd3affc2-25a4-4b24-9e21-275badb8b6d9/method:publickey) 
    ERROR: Failed to authenticate as jenkins with credential=fd3affc2-25a4-4b24-9e21-275badb8b6d9 
    java.io.IOException: Publickey authentication failed. 
     at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:315) 
     at com.trilead.ssh2.Connection.authenticateWithPublicKey(Connection.java:467) 
     at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPublicKeyAuthenticator.doAuthenticate(TrileadSSHPublicKeyAuthenticator.java:109) 
     at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.authenticate(SSHAuthenticator.java:408) 
     at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.authenticate(SSHAuthenticator.java:428) 
     at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1173) 
     at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:701) 
     at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696) 
     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:745) 
    Caused by: java.io.IOException: Decrypted PEM has wrong padding, did you specify the correct password? 
     at com.trilead.ssh2.crypto.PEMDecoder.removePadding(PEMDecoder.java:110) 
     at com.trilead.ssh2.crypto.PEMDecoder.decryptPEM(PEMDecoder.java:287) 
     at com.trilead.ssh2.crypto.PEMDecoder.decode(PEMDecoder.java:320) 
     at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:224) 
     ... 11 more 
    [06/25/15 13:06:55] [SSH] Authentication failed. 
    hudson.AbortException: Authentication failed. 
     at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1178) 
     at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:701) 
     at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696) 
     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:745) 
    [06/25/15 13:06:55] Launch failed - cleaning up connection 
    [06/25/15 13:06:55] [SSH] Connection closed. 

回答

1

本文介绍了如何使用主公共SSH密钥来连接设备到主设备: https://www.caktusgroup.com/blog/2012/01/10/configuring-jenkins-slave/

要恢复:

  • 生成主服务器上的SSH密钥:SSH -keygen -t rsa(不含释义)
  • 从.ssh/id_rsa.pub复制公用主密钥
  • 在从站上,pa在/home/jenkins/.ssh/authorized_keys中输入公钥(如果/ home/jenkins是您的主文件夹)

请确认它解决了您的问题。

+1

请在你的问题的链接的相关内容,并添加链接仅作为进一步的参考,让你的answerstaysuseful即使该链接是死在某个时刻 – LionC

+0

回答编辑,谢谢。 –

0

.ssh目录必须具有适当的访问权限,该组和其他人不能具有写入权限。 搭配chmod 700的〜/ .ssh 应该使其工作