前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >启动 jenkins Job for jenkins.service failed....

启动 jenkins Job for jenkins.service failed....

原创
作者头像
Antler
修改2018-09-12 10:51:52
8.2K0
修改2018-09-12 10:51:52
举报
文章被收录于专栏:Strive

搭建环境 | 系统:centos 7 | Java 1.8 | jenkins 2.121.3-1.1 2.1

[root@master ~]# /etc/init.d/jenkins start

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

[FAILED]

查看日志

● jenkins.service - LSB: Jenkins Automation Serve

Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)

Active: failed (Result: exit-code) since Tue 2018-09-11 20:39:41 EDT; 2min 48s ago

Docs: man:systemd-sysv-generator(8)

Sep 11 20:39:38 master systemd[1]: Starting LSB: Jenkins Automation Server...

Sep 11 20:39:40 master runuser[11110]: pam_unix(runuser:session): session opened for ...=0)

Sep 11 20:39:41 master jenkins[11104]: Starting Jenkins bash: /usr/jdk1.8: Is a directory

Sep 11 20:39:41 master runuser[11110]: pam_unix(runuser:session): session closed for ...oot

Sep 11 20:39:41 master jenkins[11104]: [FAILED]

Sep 11 20:39:41 master systemd[1]: jenkins.service: control process exited, code=exit...s=1

Sep 11 20:39:41 master systemd[1]: Failed to start LSB: Jenkins Automation Server.

Sep 11 20:39:41 master systemd[1]: Unit jenkins.service entered failed state.

Sep 11 20:39:41 master systemd[1]: jenkins.service failed.

Hint: Some lines were ellipsized, use -l to show in full.


修改配置文件:

candidates="

#/etc/alternatives/java

#/usr/lib/jvm/java-1.8.0/bin/java

#/usr/lib/jvm/jre-1.8.0/bin/java

#/usr/lib/jvm/java-1.7.0/bin/java

#/usr/lib/jvm/jre-1.7.0/bin/java

#/usr/bin/java

#/usr/jdk1.8

/usr/jdk1.8/bin/java

"

在candidates里插入自己的jdk java路径,其他的全部注释掉

#JENKINS_USER="jenkins"

JENKINS_USER="root"

JENKINS_USER 改成root

再次启动jenkins

[root@master ~]# /etc/init.d/jenkins start

Starting jenkins (via systemctl): Warning: jenkins.service changed on disk. Run 'systemctl daemon-reload' to reload units.

[ OK ]

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 查看日志
  • 再次启动jenkins
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档