码迷,mamicode.com
首页 > 其他好文 > 详细

rpm安装Jenkins报错

时间:2020-01-22 16:47:34      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:node   off   res   分析   red   art   默认   lct   bash   

root@hadoop001 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@hadoop001 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 Wed 2020-01-22 14:48:53 CST; 15s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 30286 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)

Jan 22 14:48:53 hadoop001 systemd[1]: Starting LSB: Jenkins Automation Server...
Jan 22 14:48:53 hadoop001 runuser[30291]: pam_unix(runuser:session): session opened for user root by (uid=0)
Jan 22 14:48:53 hadoop001 jenkins[30286]: Starting Jenkins bash: /usr/bin/java: No such file or directory
Jan 22 14:48:53 hadoop001 jenkins[30286]: [FAILED]
Jan 22 14:48:53 hadoop001 systemd[1]: jenkins.service: control process exited, code=exited status=1
Jan 22 14:48:53 hadoop001 systemd[1]: Failed to start LSB: Jenkins Automation Server.
Jan 22 14:48:53 hadoop001 systemd[1]: Unit jenkins.service entered failed state.
Jan 22 14:48:53 hadoop001 systemd[1]: jenkins.service failed.

问题分析
JDK的安装路径和Jenkins 默认的JDK路径不一致

[root@hadoop001 sysconfig]# cd  /usr/bin/java
-bash: cd: /usr/bin/java: No such file or directory
[root@hadoop001 sysconfig]# vim jenkins
[root@hadoop001 sysconfig]# echo $JAVA_HOME
/opt/module/jdk1.8.0_144
[root@hadoop001 sysconfig]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/module/jdk1.8.0_144/bin:/opt/module/hadoop-2.7.2/bin:/opt/module/hadoop-2.7.2/sbin:/root/bin
[root@hadoop001 sysconfig]# which java
/opt/module/jdk1.8.0_144/bin/java

问题解决
建立软连接

[root@hadoop001 sysconfig]# ln -s /opt/module/jdk1.8.0_144/bin/java /usr/bin/java
[root@hadoop001 sysconfig]# which java
/usr/bin/java
[root@hadoop001 sysconfig]# systemctl start jenkins
[root@hadoop001 sysconfig]# lsof -i:8888
COMMAND PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
java    997 root  162u  IPv4 1407529      0t0  TCP *:ddi-tcp-1 (LISTEN)

rpm安装Jenkins报错

标签:node   off   res   分析   red   art   默认   lct   bash   

原文地址:https://www.cnblogs.com/dalianpai/p/12228628.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!