简体   繁体   English

Jenkins SSH从站配置

[英]Jenkins SSH Slave Configuration

I am trying to configure a slave for my jenkins Master. 我正在尝试为我的詹金斯大师配置一个奴隶。 I did the below steps. 我做了以下步骤。

  1. enabled passwordless auth to remote host(GNU LINUX) 对远程主机启用了无密码身份验证(GNU LINUX)
  2. Configured the slave on master 在主站上配置了从站

I can see the slave.jar being copied to remote host folder. 我可以看到slave.jar被复制到远程主机文件夹。 But it is failing with the below error 但是它失败并显示以下错误

Expanded the channel window size to 4MB
  [11/07/14 19:11:54] [SSH] Starting slave process: cd "/test/app/abc/slavetest" && /usr/java        /jdk1.6.0_29 -XX:MaxPermSize=2048m -Xmx2048m -jar slave.jar
  bash: /usr/java/jdk1.6.0_29: is a directory
  hudson.util.IOException2: Slave JVM has terminated. Exit code=126
    at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:953)
    at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:133)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:711)
    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.EOFException: unexpected stream termination
    at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:200)
    at hudson.remoting.Channel.<init>(Channel.java:419)
    at hudson.remoting.Channel.<init>(Channel.java:398)
    at hudson.remoting.Channel.<init>(Channel.java:394)
    at hudson.remoting.Channel.<init>(Channel.java:383)
    at hudson.remoting.Channel.<init>(Channel.java:375)
    at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:344)
    at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:945)
    ... 7 more  
  [11/07/14 19:11:54] Launch failed - cleaning up connection
  [11/07/14 19:11:54] [SSH] Connection closed.

Any idea what I am doing wrong? 知道我在做什么错吗?

You have your slave's path to the java executable misconfigured: 您的slave路径错误地配置了java可执行文件:

/usr/java        /jdk1.6.0_29 -XX:MaxPermSize=2048m -Xmx2048m -jar slave.jar

The blank space should be removed, and the full path should be 空格应被删除,完整路径应为

/usr/java/jdk1.6.0_29/bin/java 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM