您当前的位置:首页 > 计算机 > 服务器 > 网络服务

Job for jenkins.service failed because the control process exited with error code. See "systemc

时间:12-11来源:作者:点击数:

Job for jenkins.service failed because the control process exited with error code. See "systemctl st

Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.

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 一 2019-06-10 18:22:24 CST; 5s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 24344 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)

6月 10 18:22:24 pinyoyougou-docker systemd[1]: Starting LSB: Jenkins Automation Server...
6月 10 18:22:24 pinyoyougou-docker runuser[24345]: pam_unix(runuser:session): session opened for us...=0)
6月 10 18:22:24 pinyoyougou-docker jenkins[24344]: Starting Jenkins bash: /usr/bin/java: 没有那个文…目录
6月 10 18:22:24 pinyoyougou-docker systemd[1]: jenkins.service: control process exited, code=exited...s=1
6月 10 18:22:24 pinyoyougou-docker jenkins[24344]: [失败]
6月 10 18:22:24 pinyoyougou-docker systemd[1]: Failed to start LSB: Jenkins Automation Server.
6月 10 18:22:24 pinyoyougou-docker systemd[1]: Unit jenkins.service entered failed state.
6月 10 18:22:24 pinyoyougou-docker systemd[1]: jenkins.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
在这里插入图片描述

看到原因是因为:

在这里插入图片描述

解决方案:

决方法:

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

然后重启jenkis

systemctl restart jenkins重启
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门