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
  • 相关阅读:
    Linux下redis的安装
    elasticsearch使用时问题
    Elasticsearch 2.x plugin 问题汇总
    elasticsearch-jdbc 插件说明
    ElasticSearch 2.x 问题汇总
    深入JVM《一》
    linux fastdfs 搭建配置(单机)
    mybatis自动generator
    spring-boot mybatis 配置 主从分离 事务
    Maven Nexus
  • 原文地址:https://www.cnblogs.com/codingmode/p/15756519.html
Copyright © 2011-2022 走看看