2014-03-03 71 views
0

當構建主管運行Ubuntu 13.04時,此配置有效。由於使用Jenkins 1.509.2將構建主體升級到Ubuntu 13.10,因此在歸檔工件步驟中,Ubuntu 12.04構建從機失敗。我在Google上搜索並檢查了Debian BTS和Launchpad,但沒有發現任何此錯誤提及。Jenkins 1.509.2無法在Ubuntu上構建

Archiving artifacts 
ERROR: Failed to archive artifacts: **/* 
hudson.util.IOException2: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.StringBuffer 
     at hudson.FilePath.copyRecursiveTo(FilePath.java:1942) 
     at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:137) 
     at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) 
     at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:802) 
     at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:774) 
     at hudson.model.Build$BuildExecution.post2(Build.java:183) 
     at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:724) 
     at hudson.model.Run.execute(Run.java:1600) 
     at hudson.matrix.MatrixRun.run(MatrixRun.java:146) 
     at hudson.model.ResourceController.execute(ResourceController.java:88) 
     at hudson.model.Executor.run(Executor.java:237) 
Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.StringBuffer 
     at hudson.remoting.Channel$4.adapt(Channel.java:704) 
     at hudson.remoting.Channel$4.adapt(Channel.java:699) 
     at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) 
     at hudson.FilePath.copyRecursiveTo(FilePath.java:1940) 
     ... 10 more 
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.StringBuffer 
     at hudson.util.io.TarArchiver.visitSymlink(TarArchiver.java:79) 
     at hudson.util.DirScanner$Glob.scan(DirScanner.java:126) 
     at hudson.FilePath.writeToTar(FilePath.java:1978) 
     at hudson.FilePath.access$1000(FilePath.java:168) 
     at hudson.FilePath$36.invoke(FilePath.java:1919) 
     at hudson.FilePath$36.invoke(FilePath.java:1915) 
     at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2387) 
     at hudson.remoting.UserRequest.perform(UserRequest.java:118) 
     at hudson.remoting.UserRequest.perform(UserRequest.java:48) 
     at hudson.remoting.Request$2.run(Request.java:326) 
     at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 
     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:744) 
Build step 'Archive the artifacts' changed build result to FAILURE 
+0

除了Ubuntu版本之外,您是否改變過其他任何內容?這看起來像是JVM版本或Jenkins版本的問題。 –

+0

不是我所知道的。更新Ubuntu爲Jenkins和OpenJDK帶來了更新。我確實證實了jenkins master將slave.jar提供給了構建從站。特別是我應該調查什麼? Windows構建奴隸的作品。它通過JNLP啓動。 – dsh

回答

0

我確定只有當工作區包含符號鏈接時纔會發生崩潰。作爲一種解決方法,我在jenkins繼續歸檔工作區之前向我的(「execute shell」)構建步驟中刪除了所有符號鏈接。

# 
# Workaround Jenkins bug: 
# 
# Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.StringBuffer 
# at hudson.util.io.TarArchiver.visitSymlink(TarArchiver.java:79) 
# 
find . -type l -print0 | xargs -0 rm -f