jenkins slave任务报错
请问各位大佬,下面这个报错如何解决
我搭建了master和slave 配置一样的,主要就是把gitlab下的代码拉到另外一台服务器,打包并发布。 但是master任务成功,slave报错了??(代码已经拉到了,好像主要在maven打包这里出错) 还有就是error的表示没那个文件或目录的,表示什么意思???
代码如下 请帮忙看看
> git rev-list --no-walk 567dc57b42f247a67ca0188e56cf490f40bb1800 # timeout=10 Parsing POMs maven31-agent.jar already up to date maven31-interceptor.jar already up to date maven3-interceptor-commons.jar already up to date [testlzy] $ java -DskipTests=true -cp /data/server/jenkins/maven31-agent.jar:/data/server/apache-maven-3.2.3/boot/plexus-classworlds-2.5.1.jar:/data/server/apache-maven-3.2.3/conf/logging jenkins.maven3.agent.Maven31Main /data/server/apache-maven-3.2.3 /data/server/jenkins/slave.jar /data/server/jenkins/maven31-interceptor.jar /data/server/jenkins/maven3-interceptor-commons.jar 46337 SSH: Connecting from host [iZwz91fq9zs8o7ehext2lcZ] SSH: Connecting with configuration [host13] ... SSH: Disconnecting configuration [host13] ... SSH: Transferred 0 file(s) ERROR: Failed to parse POMs java.io.IOException: Cannot run program "java" (in directory "/data/server/jenkins/workspace/testlzy"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at hudson.Proc$LocalProc.<init>(Proc.java:249) at hudson.Proc$LocalProc.<init>(Proc.java:218) at hudson.Launcher$LocalLauncher.launch(Launcher.java:929) at hudson.Launcher$ProcStarter.start(Launcher.java:449) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1299) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1259) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) 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:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to haha_120.78.12.10 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) at hudson.remoting.Channel.call(Channel.java:955) at hudson.Launcher$RemoteLauncher.launch(Launcher.java:1052) at hudson.Launcher$ProcStarter.start(Launcher.java:449) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:266) at hudson.maven.ProcessCache.get(ProcessCache.java:236) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:755) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1815) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)
找到问题的所在了,因为搭建Jenkins的机器已经安装了maven和jdk,但是在全局配置那里,也应该把 jdk和maven的路径加上去,就ok了