zoukankan      html  css  js  c++  java
  • Job for jenkins.service failed because the control process exited with error code.

    root@xiakaibi-PC:~# service jenkins restart
    Job for jenkins.service failed because the control process exited with error code.
    See "systemctl status jenkins.service" and "journalctl -xe" for details.

    root@xiakaibi-PC:~# systemctl status jenkins.service
    ● jenkins.service - LSB: Start Jenkins at boot time
    Loaded: loaded (/etc/init.d/jenkins; generated; vendor preset: enabled)
    Active: failed (Result: exit-code) since Tue 2019-09-17 16:52:59 CST; 1min 32s ago
    Docs: man:systemd-sysv-generator(8)
    Process: 28888 ExecStart=/etc/init.d/jenkins start (code=exited, status=1/FAILURE)

    9月 17 16:52:59 xiakaibi-PC systemd[1]: Starting LSB: Start Jenkins at boot time...
    9月 17 16:52:59 xiakaibi-PC jenkins[28888]: ERROR: No Java executable found in current PATH: /bin:/usr/bin:/sbin:/usr/sbi
    9月 17 16:52:59 xiakaibi-PC jenkins[28888]: If you actually have java installed on the system make sure the executable is
    9月 17 16:52:59 xiakaibi-PC systemd[1]: jenkins.service: Control process exited, code=exited status=1
    9月 17 16:52:59 xiakaibi-PC systemd[1]: Failed to start LSB: Start Jenkins at boot time.
    9月 17 16:52:59 xiakaibi-PC systemd[1]: jenkins.service: Unit entered failed state.
    9月 17 16:52:59 xiakaibi-PC systemd[1]: jenkins.service: Failed with result 'exit-code'.

    解决办法 
    意思就是没有找到java文件,需要自己把java文件地址复制过去 

    打开etc/init.d/jenkins文件,可以看到头部指定的path路径没有包含java_home。应该是在第一次安装的时候,系统读取了jdk未安装时的路径。修改配置再试下

    重启jenkins:

    sudo service jenkins restart

  • 相关阅读:
    【HDOJ】4370 0 or 1
    【HDOJ】4122 Alice's mooncake shop
    【HDOJ】4393 Throw nails
    【HDOJ】2385 Stock
    WinCE 输入法编程
    WinCE 自由拼音输入法的测试
    SQL Server CE开发环境建立过程
    【SQL Server CE2.0】创建加密的数据库(源代码)
    【SQL Server CE2.0】打开加密的数据库(源代码)
    EVC在双核PC上调试速度慢的原因
  • 原文地址:https://www.cnblogs.com/python-xiakaibi/p/11535926.html
Copyright © 2011-2022 走看看