Ubuntu Slave Node(Jenkins)错误

时间:2017-02-15 11:04:36

标签: java ubuntu jenkins slave

我最近在开发Jenkins环境中设置了一个RHEL7从属节点,它只是通过SSH运行一些特定于Unix的脚本。

在我的公司生产环境(使用不同的从属节点(Ubuntu 16.04))中,基本上已经复制了这个时间,我已经从Dev jenkins复制了从属节点配置并且正在处理日志产生的错误,但是我已经暂时停留在这个阶段,并且无法找到与我的情况相关的任何文档。

我收到以下错误:

    [02/15/17 10:47:11] [SSH] Starting slave process: cd "/home/jenkins" && java  -jar slave.jar
Exception in thread "main" java.lang.RuntimeException: Root directory not writable
    at hudson.remoting.FileSystemJarCache.<init>(FileSystemJarCache.java:44)
    at hudson.remoting.Launcher.runWithStdinStdout(Launcher.java:477)
    at hudson.remoting.Launcher.run(Launcher.java:251)
    at hudson.remoting.Launcher.main(Launcher.java:201)
hudson.util.IOException2: Slave JVM has terminated. Exit code=1
    at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:984)
    at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:137)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:725)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:706)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException: unexpected stream termination
    at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
    at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
    at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:389)
    at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:976)
    ... 7 more
[02/15/17 10:47:11] Launch failed - cleaning up connection
[02/15/17 10:47:11] [SSH] Connection closed.

我有双重,三重检查根目录(home / jenkins / jenkins_slave)的权限,他们很好。如果我尝试在从属节点上手动运行java -jar slave.jar,我会收到以下错误:

WARNING: Are you running slave agent from an interactive console?
If so, you are probably using it incorrectly.
See http://wiki.jenkins ci.org/display/JENKINS/Launching+slave.jar+from+from+console
<===[JENKINS REMOTING CAPACITY]===>

我只是不明白,因为权限和配置是相同的所以它必须是环保的东西?任何帮助/指导将不胜感激。

1 个答案:

答案 0 :(得分:0)

您的住宅不是/home/jenkins/jenkins_slave而是home/jenkins - 至少根据您提供的日志输出(Starting slave process: cd "/home/jenkins" [...])。因此,您应该将奴隶的启动配置更改为/home/jenkins/jenkins_slave