[英]Java Exception "java.lang.IllegalArgumentException: Expecting ----prefix" when starting Jenkins Service
I'm upgrading a Jenkins server to 2.357 and I've upgraded Java to 11 from 1.8 to support it.我正在将 Jenkins 服务器升级到2.357 ,并且我已经将 Java 从 1.8 升级到 11 以支持它。
However, when I start the Jenkins, it fails and journalctl -xe
gives the below error但是,当我启动 Jenkins 时,它失败了并且
journalctl -xe
给出了以下错误
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.
Jul 11 14:28:57 jenkins01 systemd[1]: Unit jenkins.service entered failed state.
Jul 11 14:28:57 jenkins01 systemd[1]: jenkins.service failed.
Jul 11 14:28:57 jenkins01 systemd[1]: jenkins.service holdoff time over, scheduling restart.
Jul 11 14:28:57 jenkins01 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.
Jul 11 14:28:57 jenkins01 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.
Jul 11 14:28:57 jenkins01 jenkins[19752]: Running from: /usr/share/java/jenkins.war
Jul 11 14:28:57 jenkins01 jenkins[19752]: Exception in thread "main" java.lang.IllegalArgumentException: Expecting ----prefix=VALUE but found no value
Jul 11 14:28:57 jenkins01 jenkins[19752]: at winstone.cmdline.CmdLineParser.parse(CmdLineParser.java:60)
Jul 11 14:28:57 jenkins01 jenkins[19752]: at winstone.Launcher.getArgsFromCommandLine(Launcher.java:415)
Jul 11 14:28:57 jenkins01 jenkins[19752]: at winstone.Launcher.main(Launcher.java:385)
Jul 11 14:28:57 jenkins01 jenkins[19752]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Jul 11 14:28:57 jenkins01 jenkins[19752]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Jul 11 14:28:57 jenkins01 jenkins[19752]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Jul 11 14:28:57 jenkins01 jenkins[19752]: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Jul 11 14:28:57 jenkins01 jenkins[19752]: at Main._main(Main.java:332)
Jul 11 14:28:57 jenkins01 jenkins[19752]: at Main.main(Main.java:114)
Jul 11 14:28:57 jenkins01 systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
Jul 11 14:28:57 jenkins01 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.
Jul 11 14:28:57 jenkins01 systemd[1]: Unit jenkins.service entered failed state.
Jul 11 14:28:57 jenkins01 systemd[1]: jenkins.service failed.
Jul 11 14:28:58 jenkins01 systemd[1]: jenkins.service holdoff time over, scheduling restart.
Jul 11 14:28:58 jenkins01 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.
Jul 11 14:28:58 jenkins01 systemd[1]: start request repeated too quickly for jenkins.service
Jul 11 14:28:58 jenkins01 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.
Jul 11 14:28:58 jenkins01 systemd[1]: Unit jenkins.service entered failed state.
Jul 11 14:28:58 jenkins01 systemd[1]: jenkins.service failed.
Looks like it points to the exception Exception in thread "main" java.lang.IllegalArgumentException: Expecting ----prefix=VALUE but found no value
but I can't seem to figure it out.看起来它指向
Exception in thread "main" java.lang.IllegalArgumentException: Expecting ----prefix=VALUE but found no value
但我似乎无法弄清楚。 A help would be appreciated!帮助将不胜感激!
Java Version: Java版本:
openjdk version "11.0.15" 2022-04-19 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.15+9-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.15+9-LTS, mixed mode, sharing)
The error indicates that you are somehow passing the --prefix
startup parameter with an invalid value.该错误表明您以某种方式传递了带有无效值的
--prefix
启动参数。 --prefix
is only needed if you have a custom context path for Jenkins. --prefix
仅在您有 Jenkins 的自定义上下文路径时才需要。
If you are starting your Jenkins server as a service, check the service definition and make sure only the required parameters are passed.如果您将 Jenkins 服务器作为服务启动,请检查服务定义并确保仅传递所需的参数。 The service definition is located at
/etc/systemd/system/jenkins.service
服务定义位于
/etc/systemd/system/jenkins.service
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.