Jenkins 2.346无法在CentOS 7上启动

2fjabf4q  于 2022-11-02  发布在  Jenkins
关注(0)|答案(1)|浏览(1012)

我按照这里的说明在CentOS 7上安装了最新的Jenkins,其中包括安装Java OpenJDK 11。https://www.jenkins.io/doc/book/installing/linux/#red-hat-centos
这是成功的,我能够运行Jenkins并建立一个单独的项目。一个月后,我看到Jenkins有一个更新可用,所以我经历了安装最新的过程。可能我在这里做错了什么,因为我只是运行命令再次安装Jenkins而不是更新???无论如何,它似乎成功了,但随后不会启动。简而言之,它似乎不再识别Java了。我在上面看到的所有答案似乎都过时了,例如,编辑/etc/init.d/jenkins并添加Java路径。我如何在CentOS 7上验证/修复最新版本Jenkins的Java路径?


**sudo 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.

**sudo systemctl status jenkins**

● jenkins.service - Jenkins Continuous Integration Server
   Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Thu 2022-09-01 15:25:36 PDT; 5min ago
 Main PID: 4512 (code=exited, status=1/FAILURE)
 systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
 systemd[1]: Failed to start Jenkins Continuous Integration Server.
 systemd[1]: Unit jenkins.service entered failed state.
 systemd[1]: jenkins.service failed.
 systemd[1]: jenkins.service holdoff time over, scheduling restart.
 systemd[1]: Stopped Jenkins Continuous Integration Server.
 systemd[1]: start request repeated too quickly for jenkins.service
 systemd[1]: Failed to start Jenkins Continuous Integration Server.
 systemd[1]: Unit jenkins.service entered failed state.
 systemd[1]: jenkins.service failed.

**sudo journalctl -xe**

-- Unit jenkins.service has begun starting up.
 systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
 jenkins[7170]: jenkins: failed to find a valid Java installation
 systemd[1]: Failed to start Jenkins Continuous Integration Server.
-- Subject: Unit jenkins.service has failed
eqqqjvef

eqqqjvef1#

最后这个问题与Jenkins升级无关。不知怎么的,到Java的符号链接被搞砸了。我修复了这个问题,Jenkins启动得很好。

相关问题