I. In the process of writing with jenkins, the following problems suddenly appeared
Parsing POMs Established TCP socket on 59407 [java] $ java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.12-alpha-1.jar:/usr/local/apache-maven-3.5.4/boot/plexus-classworlds-2.5.2.jar:/usr/local/apache-maven-3.5.4/conf/logging jenkins.maven3.agent.Maven35Main /usr/local/apache-maven-3.5.4 /var/cache/jenkins/war/WEB-INF/lib/remoting-3.23.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.12-alpha-1.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.12-alpha-1.jar 59407 ERROR: Failed to parse POMs java.io.IOException: Cannot run program “java” (in directory “/var/lib/jenkins/workspace/java”): error=2, Not having that 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.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:278) at hudson.maven.ProcessCache.get(ProcessCache.java:236) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1815) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Caused by: java.io.IOException: error=2, Not having that file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) … 12 more Email was triggered for: Always Sending email for trigger: Always Sending email to: [email protected] Finished: FAILURE
Solution:
The above error message is not specified JDK path, the solution: is in the Jenkins system management → global tools configuration → find the JDK configuration items in JAVA_HOME set your jdk directory path, save restart Jenkins on the line!