Jenkins Failed to archive test report

在Jenkins 上Python 的自动化脚本时碰到下面的错误

Recording test results
ERROR: Failed to archive test reportsjava.io.IOException: remote file operation failed: /var/lib/jenkins/workspace/libvirt-functional-test-rhel7-pci-hotplug.ppc at hudson.remoting.Channel@8b4b00f:PPCLE1
	at hudson.FilePath.act(FilePath.java:916)
	at hudson.FilePath.act(FilePath.java:893)
	at hudson.tasks.junit.JUnitParser.parse(JUnitParser.java:87)
	at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:117)
	at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:129)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:756)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
	at hudson.model.Build$BuildExecution.post2(Build.java:182)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:669)
	at hudson.model.Run.execute(Run.java:1731)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:232)Caused by: java.io.IOException: Remote call on PPCLE1 failed
	at hudson.remoting.Channel.call(Channel.java:748)
	at hudson.FilePath.act(FilePath.java:909)
	... 13 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins
	at hudson.util.io.ParserConfigurator.applyConfiguration(ParserConfigurator.java:78)
	at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:121)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:273)
	at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:229)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:164)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:147)
	at hudson.tasks.junit.TestResult.<init>(TestResult.java:123)
	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:117)
	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:90)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2474)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:328)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)Build step 'Publish JUnit test result report' changed build result to FAILURE
Finished: FAILURE


针对上述错误,解决方法如下

  1. 登录运行Jenkins job 的机器,kill 掉当前的Jenkins job

    # ps aux|grep java
    root     60195  0.0  0.0 111808  4032 ?        Ss   06:30   0:00 bash -c cd "/var/lib/jenkins" && java  -jar slave.jar
    root     60209  0.0  0.2 4612032 92992 ?       Sl   06:30   0:09 java -jar slave.jar
    #kill -9 60195


2.登录Jenkins server, 重新加载运行jenkins job 的机器

3.重新运行自动化job 上面的问题已经解决

你可能感兴趣的:(自动化测试)