我用java 11安装了jenkins,一切似乎都设置得很好,但当启动jenkins服务时,过程失败,当我运行“systemctl status jenkins-service”时,我得到了以下日志
启动jenkins时得到的结果:“systemctl start jenkins.service
[root@localhost ~]# systemctl start jenkins.service
Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
字符串
这是我在运行“systemctl jenkins.service”时得到的状态:[root@localhost ~]# systemctl status jenkins.service
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/usr/lib/systemd/system/jenkins.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Wed 2022-11-09 23:41:16 UTC; 9s ago
Process: 2605 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
Main PID: 2605 (code=exited, status=1/FAILURE)
Nov 09 23:41:16 localhost.localdomain systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
Nov 09 23:41:16 localhost.localdomain systemd[1]: Failed to start Jenkins Continuous Integration Server.
Nov 09 23:41:16 localhost.localdomain systemd[1]: Unit jenkins.service entered failed state.
Nov 09 23:41:16 localhost.localdomain systemd[1]: jenkins.service failed.
Nov 09 23:41:16 localhost.localdomain systemd[1]: jenkins.service holdoff time over, scheduling restart.
Nov 09 23:41:16 localhost.localdomain systemd[1]: Stopped Jenkins Continuous Integration Server.
Nov 09 23:41:16 localhost.localdomain systemd[1]: start request repeated too quickly for jenkins.service
Nov 09 23:41:16 localhost.localdomain systemd[1]: Failed to start Jenkins Continuous Integration Server.
Nov 09 23:41:16 localhost.localdomain systemd[1]: Unit jenkins.service entered failed state.
Nov 09 23:41:16 localhost.localdomain systemd[1]: jenkins.service failed.
型
此外,我得到这个错误日志时,我运行“journalctl -xe”
[root@localhost ~]# journalctl -xe
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at executable.Main._main(Main.java:334)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at executable.Main.main(Main.java:116)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: 2022-11-10 00:09:52.467+0000 [id=1] WARNING winst
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: 2022-11-10 00:09:52.564+0000 [id=1] INFO winstone
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: java.io.FileNotFoundException: %C/jenkins/war/META-INF/MANIFEST
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/java.io.FileOutputStream.open0(Native Method)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/java.io.FileOutputStream.open(FileOutputStream.jav
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/java.io.FileOutputStream.<init>(FileOutputStream.j
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/java.io.FileOutputStream.<init>(FileOutputStream.j
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.HostConfiguration.getWebRoot(HostConfiguration.java
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.HostConfiguration.<init>(HostConfiguration.java:85)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.HostGroup.initHost(HostGroup.java:65)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.HostGroup.<init>(HostGroup.java:44)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.Launcher.<init>(Launcher.java:182)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.Launcher.main(Launcher.java:403)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at executable.Main._main(Main.java:334)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at executable.Main.main(Main.java:116)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: 2022-11-10 00:09:52.565+0000 [id=1] SEVERE winsto
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: java.io.FileNotFoundException: %C/jenkins/war/META-INF/MANIFEST
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/java.io.FileOutputStream.open0(Native Method)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/java.io.FileOutputStream.open(FileOutputStream.jav
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/java.io.FileOutputStream.<init>(FileOutputStream.j
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/java.io.FileOutputStream.<init>(FileOutputStream.j
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.HostConfiguration.getWebRoot(HostConfiguration.java
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.HostConfiguration.<init>(HostConfiguration.java:85)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.HostGroup.initHost(HostGroup.java:65)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.HostGroup.<init>(HostGroup.java:44)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.Launcher.<init>(Launcher.java:182)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at winstone.Launcher.main(Launcher.java:403)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at executable.Main._main(Main.java:334)
Nov 10 00:09:52 localhost.localdomain jenkins[16798]: at executable.Main.main(Main.java:116)
Nov 10 00:09:52 localhost.localdomain systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
Nov 10 00:09:52 localhost.localdomain systemd[1]: Failed to start Jenkins Continuous Integration Server.
-- Subject: Unit jenkins.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit jenkins.service has failed.
--
-- The result is failed.
Nov 10 00:09:52 localhost.localdomain systemd[1]: Unit jenkins.service entered failed state.
Nov 10 00:09:52 localhost.localdomain systemd[1]: jenkins.service failed.
Nov 10 00:09:52 localhost.localdomain systemd[1]: jenkins.service holdoff time over, scheduling restart.
Nov 10 00:09:52 localhost.localdomain systemd[1]: Stopped Jenkins Continuous Integration Server.
-- Subject: Unit jenkins.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit jenkins.service has finished shutting down.
Nov 10 00:09:52 localhost.localdomain systemd[1]: Starting Jenkins Continuous Integration Server...
-- Subject: Unit jenkins.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit jenkins.service has begun starting up.
型
1条答案
按热度按时间0lvr5msh1#
我也遇到了同样的问题,可能是因为Jenkins需要特定版本的Java才能正常运行。最终,我重新安装了Jenkins,并按照官方文档安装了java-17-openjdk,解决了这个问题。(https://www.jenkins.io/doc/book/installing/linux/)
字符串
the official documentation