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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 Jenkins报错:Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details. Job for jenkins.service failed because the control process exited with error code. centos7启动MySQL报 Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details. Job for php-fpm.service failed because the control process exited with error code. See "systemctl status php-fpm.service" and "journalctl -xe" for details. Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details Job for mongod.service failed because the control process exited with error code. See "systemctl status mongod.service" and "journalctl -xe" for details Linux系统Docker启动问题Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" service mysql start ,出现错误Job for mysql.service failed because the control process exited process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. centos 报错 “Job for iptables.service failed because the control process exited with error code.”的解决办法 ubuntu16.04,mysql5.7重启不成功。Restarting mysql (via systemctl): mysql.serviceJob for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service"
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM