java.io.IOException: Cannot run program "/opt/jdk1.8.0_191/bin/java" (in directory "/var/lib/jenkins/workspace/xinguan"): error=2, No such file or directory

测试jenkins构建,报错如下

Parsing POMs
Established TCP socket on 44463
[xinguan] $ /opt/jdk1.8.0_191/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.13.jar:/opt/maven-3.6/boot/plexus-classworlds-2.5.2.jar:/opt/maven-3.6/conf/logging jenkins.maven3.agent.Maven35Main /opt/maven-3.6 /var/cache/jenkins/war/WEB-INF/lib/remoting-3.33.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.13.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.13.jar 44463
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "/opt/jdk1.8.0_191/bin/java" (in directory "/var/lib/jenkins/workspace/xinguan"): error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at hudson.Proc$LocalProc.<init>(Proc.java:250)
    at hudson.Proc$LocalProc.<init>(Proc.java:219)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:937)
    at hudson.Launcher$ProcStarter.start(Launcher.java:455)
    at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:280)
    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, No such 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
Finished: FAILURE

手动确定了 /opt/jdk1.8.0_191/bin/java/var/lib/jenkins/workspace/xinguan 都是正常存在的目录,但还是报错没有文件或目录

于是乎手动执行了一下上面提示的命令:

[[email protected] jdk1.8.0_191]# /opt/jdk1.8.0_191/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.13.jar:/opt/maven-3.6/boot/plexus-classworlds-2.5.2.jar:/opt/maven-3.6/conf/logging jenkins.maven3.agent.Maven35Main /opt/maven-3.6 /var/cache/jenkins/war/WEB-INF/lib/remoting-3.33.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.13.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.13.jar
-bash: /opt/jdk1.8.0_191/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

哦吼,问题出来了,缺少依赖包glibc.i686,安装

yum install glibc.i686 -y

原文地址:https://www.cnblogs.com/winstom/p/12067030.html

时间: 2024-10-10 12:54:25

java.io.IOException: Cannot run program "/opt/jdk1.8.0_191/bin/java" (in directory "/var/lib/jenkins/workspace/xinguan"): error=2, No such file or directory的相关文章

Jmeter常见报错信息: ERROR - jmeter.protocol.http.proxy.ProxyControl: Could not initialise key store java.io.IOException: Cannot run program &quot;keytool&quot;

JMeter 2.10 用的新方法来录制HTTPS请求Java 7. 录制的过程中会碰到一些问题或者报错,就目前碰到的,做出一些总结. ERROR - jmeter.protocol.http.proxy.ProxyControl: Could not initialise key store java.io.IOException: Cannot run program "keytool" (in directory "C:\apache-jmeter-2.10\bin&q

解决方案--java执行cmd命令ProcessBuilder--出错Exception in thread "main" java.io.IOException: Cannot run program "dir d:\": CreateProcess error=2(xjl456852原创)

当我尝试在java中通过ProcessBuilder运行window的cmd命令时出现错误: public static void main(String [] args) throws IOException { ProcessBuilder builder = new ProcessBuilder(); Process process = builder.command("dir d:\\").start(); InputStream inputStream = process.g

Jenkins报错Caused: java.io.IOException: Cannot run program &quot;sh&quot; (in directory &quot;D:\Jenkins\Jenkins_home\workspace\jmeter_test&quot;): CreateProcess error=2, 系统找不到指定的文件。

想在本地执行我的python文件,我本地搭建了一个Jenkins,使用了execute shell来运行我的脚本,发现报错 [jmeter_test] $ sh -xe D:\tomcat\apache-tomcat-8.5.20\temp\jenkins4583980269774421650.sh The system cannot find the file specified FATAL: command execution failed java.io.IOException: Crea

Centos7 JDK安装过程中 解决java -version 报错: bash: /home/jdk1.8.0_161/bin/java: Permission denied

1.执行Linux命令 -----vim /etc/profile  编辑profile  文件,在里面添加: #set java enviroment JAVA_HOME=/opt/JavaHome/jdk1.8.0_171JRE_HOME=/opt/JavaHome/jdk1.8.0_171/jreCLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/libPATH=$PATH:$JAVA_HOME/bin

ClientAbortException:java.io.IOException解决方案

org.apache.catalina.connector Class ClientAbortException java.lang.Object java.lang.Throwable java.lang.Exception java.io.IOException org.apache.catalina.connector.ClientAbortException All Implemented Interfaces: java.io.Serializable ERROR [http-8080

【IE下载文件——后台报ClientAbortException:java.io.IOException错误】

一.场景 页面上提供下载Excel文件的功能,用于下载报表中的数据. 分别在chrome,IE中进行测试.在chrome中正常,在IE中后台报错. 二.错误信息 org.apache.catalina.connector.ClientAbortException: java.io.IOException    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:407)    at org.

java.io.IOException: The input doesn&#39;t contain any classes. Did you specify the proper &#39;-injars&#39; opt

问题场景 在使用Maven + Proguard打包项目进行混淆时,提示以下错误: [proguard] ProGuard, version 4.4 [proguard] Reading input... [proguard] java.io.IOException: The input doesn't contain any classes. Did you specify the proper '-injars' options? [proguard] at proguard.InputRe

Dubbo java.io.IOException: Can not lock the registry cache file

跑单测用例的时候,以前执行成功的用例,运行时控制台仍然会报 dubbo 相关的错误: Failed to save registry store file, cause: Can not lock the registry cache file 2016-03-22 17:16:05,493 [DubboSaveRegistryCache-thread-1] WARN  com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry -  [DUBB

hbase异常:java.io.IOException: Unable to determine ZooKeeper ensemble

项目中用到hbase,有时候可能会报一些异常,比如java.io.IOException: Unable to determine ZooKeeper ensemble 等等,当出现这个问题时,某某说是项目中用到线程池的问题导致的,但查看异常之后,并非跟啥线程池有关系,异常信息如下: java.io.IOException: Unable to determine ZooKeeper ensemble at org.apache.hadoop.hbase.zookeeper.ZKUtil.con