jenkins启动失败jenkins.servicefailedStartingJenki。。。失败的原因
● jenkins.service - LSB: Jenkins Automation Server
Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since ⼆ 2020-05-19 20:40:51 CST; 3min 27s ago
Docs: man:systemd-sysv-generator(8)
Process: 1880 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)
5⽉ 19 20:40:50 localhost.localdomain systemd[1]: Starting LSB: Jenkins
5⽉ 19 20:40:51 localhost.localdomain runuser[1885]: pam_unix(runuser:session): session opened for user root by (uid=0)
5⽉ 19 20:40:51 localhost.localdomain jenkins[1880]: Starting Jenkins bash: /usr/bin/java: 没有那个⽂件或⽬录
5⽉ 19 20:40:51 localhost.localdomain systemd[1]: jenkins.service: control process exited, code=exited
status=1
5⽉ 19 20:40:51 localhost.localdomain jenkins[1880]: [失败]
5⽉ 19 20:40:51 localhost.localdomain systemd[1]: Failed to start LSB: Jenkins Automation Server.
5⽉ 19 20:40:51 localhost.localdomain systemd[1]: Unit jenkins.service entered failed state.
5⽉ 19 20:40:51 localhost.localdomain systemd[1]: jenkins.service failed.
解决⽅案
启动异常,没有/usr/bin/java⽬录
修改配置⽂件vi /etc/init.d/jenkins
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
exited/usr/lib/jvm/jre-1.7.0/bin/java
/usr/lib/jvm/java-11.0/bin/java
/usr/lib/jvm/jre-11.0/bin/java
/usr/lib/jvm/java-11-openjdk-amd64
/usr/bin/java
/usr/local/jdk1.8.0_171/bin/java  #这⼀排是⾃⼰的java环境地址
"
解决⽅案2软连接
ln -s /usr/local/jdk1.8.0_161/bin/java /usr/bin/java

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。