Jenkins的slave异常:Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoti
Posted 沧海一粟,何以久远
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jenkins的slave异常:Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoti相关的知识,希望对你有一定的参考价值。
当任务分配到slave上执行时,报如下错误:
Parsing POMs Established TCP socket on 38257 maven33-agent.jar already up to date maven33-interceptor.jar already up to date maven3-interceptor-commons.jar already up to date [b012ef95d917292e062fe3d70c7a9b01] $ java -cp /var/lib/jenkins/maven33-agent.jar:/usr/install/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar:/usr/install/apache-maven-3.3.9/conf/logging jenkins.maven3.agent.Maven33Main /usr/install/apache-maven-3.3.9 /var/lib/jenkins/slave.jar /var/lib/jenkins/maven33-interceptor.jar /var/lib/jenkins/maven3-interceptor-commons.jar 38257 Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoting.Launcher at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) at jenkins.maven3.agent.Maven33Main.main(Maven33Main.java:133) at jenkins.maven3.agent.Maven33Main.main(Maven33Main.java:64)
ERROR: Failed to parse POMs 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.Channels.forProcess(Channels.java:115) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294) at hudson.maven.ProcessCache.get(ProcessCache.java:236) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1730) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405)
搜索了下解决办法:说是重连下slave。照做,问题解决。看下master连接slave的日志信息,我想原因应该是我修改过slave的环境变量hostname。不知道修改其他环境变量是否也会有同样的影响。
从日志信息上看,有一个获取slave环境变量的过程
以上是关于Jenkins的slave异常:Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoti的主要内容,如果未能解决你的问题,请参考以下文章
jenkins master 与slave 异常断开引起task 任务失败之故障深入分析