zoukankan      html  css  js  c++  java
  • Jenkins++:Job for jenkins.service failed because the control process exited with error code. See "systemctl st

    查看状态信息:

    systemctl status jenkins.service
    [root@cc sysconfig]# systemctl start jenkins
    Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
    [root@cc sysconfig]# systemctl status jenkins.service
    ● jenkins.service - LSB: Jenkins Automation Server
       Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
       Active: failed (Result: exit-code) since 六 2022-01-01 23:35:44 CST; 2min 4s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 3734 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)
    
    1月 01 23:35:44 cc systemd[1]: Starting LSB: Jenkins Automation Server...
    1月 01 23:35:44 cc runuser[3739]: pam_unix(runuser:session): session opened for user root by (uid=0)
    1月 01 23:35:44 cc jenkins[3734]: Starting Jenkins bash: /usr/bin/java: 没有那个文件或目录
    1月 01 23:35:44 cc runuser[3739]: pam_unix(runuser:session): session closed for user root
    1月 01 23:35:44 cc jenkins[3734]: [失败]
    1月 01 23:35:44 cc systemd[1]: jenkins.service: control process exited, code=exited status=1
    1月 01 23:35:44 cc systemd[1]: Failed to start LSB: Jenkins Automation Server.
    1月 01 23:35:44 cc systemd[1]: Unit jenkins.service entered failed state.
    1月 01 23:35:44 cc systemd[1]: jenkins.service failed.

    解决方案:
    1> 查看当前Java的环境变量 echo $JAVA_HOME

    2> 复制Java的环境变量地址, 编辑/etc/init.d/jenkins文件, 指定位置添加该地址, 后缀附上/bin/java vim /etc/init.d/jenkins

    修改后重启 jenkins 服务, 问题解决 systemctl start jenkins

    结果,又有一个警告 :

    执行命令:

    systemctl daemon-reload

    然后重启 jenkins:

    systemctl restart jenkins
  • 相关阅读:
    设计模式的概念与作用
    动画回调函数未执行
    使用PathfindingProject Pro 4.0.10实现2D自动寻路
    一些概念和路径记录
    android 数据库添加字符串 添加失败 解决方案
    view的focusable属性改变设置是否可获取光标
    view的clickable属性和点击background颜色改变
    java中一对多 关联建表
    Android 自定义View
    Android 之常用布局
  • 原文地址:https://www.cnblogs.com/codingmode/p/15756519.html
Copyright © 2011-2022 走看看