Jenkins" Pipe已经关闭"当复制工件到奴隶

时间:2014-08-12 08:10:12

标签: jenkins

我正在尝试为Jenkins设置Linux从属设备,似乎copyartifacts插件无法将工件从主服务器(Linux)复制到从服务器。它复制了一些文件,但总是在最后一个文件中失败,但有例外:

ERROR: Failed to copy artifacts from metabuilds-build with filter: **
java.io.IOException: Pipe is already closed
    at hudson.remoting.PipeWindow.checkDeath(PipeWindow.java:83)
    at hudson.remoting.PipeWindow$Real.get(PipeWindow.java:165)
    at hudson.remoting.ProxyOutputStream._write(ProxyOutputStream.java:118)
    at hudson.remoting.ProxyOutputStream.write(ProxyOutputStream.java:103)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
    at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:161)
    at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:118)
    at java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:72)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
    at org.apache.tools.tar.TarBuffer.writeBlock(TarBuffer.java:410)
    at org.apache.tools.tar.TarBuffer.writeRecord(TarBuffer.java:351)
    at hudson.org.apache.tools.tar.TarOutputStream.writeEOFRecord(TarOutputStream.java:356)
    at hudson.org.apache.tools.tar.TarOutputStream.finish(TarOutputStream.java:137)
    at hudson.org.apache.tools.tar.TarOutputStream.close(TarOutputStream.java:149)
    at hudson.util.io.TarArchiver.close(TarArchiver.java:119)
    at hudson.FilePath.writeToTar(FilePath.java:1619)
    at hudson.FilePath.copyRecursiveTo(FilePath.java:1544)
    at hudson.FilePath.copyRecursiveTo(FilePath.java:1473)
    at hudson.plugins.copyartifact.FilePathCopyMethod.copyAll(FilePathCopyMethod.java:51)
    at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:225)
    at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:199)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:662)
    at hudson.model.Build$RunnerImpl.build(Build.java:177)
    at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:429)
    at hudson.model.Run.run(Run.java:1374)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:145)
Caused by: java.io.IOException: Pipe is already closed
    at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:147)
    at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:131)
    at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:185)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: hudson.remoting.FastPipedInputStream$ClosedBy: The pipe was closed at...
    at hudson.remoting.FastPipedInputStream.close(FastPipedInputStream.java:112)
    at hudson.FilePath$32.invoke(FilePath.java:1540)
    at hudson.FilePath$32.invoke(FilePath.java:1534)
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1979)
    at hudson.remoting.UserRequest.perform(UserRequest.java:118)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:270)
    ... 6 more

有什么想法吗?我们有Jenkins 1.413和版本1.17的copyartifacts插件。

2 个答案:

答案 0 :(得分:1)

事实证明,我在奴隶目录中拥有不合适的权限。如果需要任何人,我会写下我所做的事情:

  • 在第一次复制工件调用时,由JENKINS-9540启发的错误我将copyartifacts插件更新到版本1.17 - 没有帮助。
  • 之后我尝试进一步传递构建,因此我禁用了copyartifacts步骤并手动将内容上传到slave(以root身份!为jenkins用户引入了错误的文件权限)
  • 当构建成功时,我返回主错误并将插件更新到版本1.20。这没有帮助,但决定检查权限是否正常,并注意到我试图替换的文件归root所有。
  • 经过一点chown和chgrp之后问题得到解决。

摘要:首先检查实际的文件/目录权限,然后再尝试更新版本的插件。

答案 1 :(得分:0)

似乎是插件的问题。您需要升级到更新版本或最新版本,具体取决于最新插件版本是否与您拥有的Jenkins版本兼容。请查看链接中的最后两个最新评论:https://issues.jenkins-ci.org/browse/JENKINS-9540