简体   繁体   English

启动 Jenkins 服务时出现 Java 异常“java.lang.IllegalArgumentException: Expecting ----prefix”

[英]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.

相关问题 异常:java.lang.IllegalArgumentException:切入点格式不正确:期待')' - Exception: java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting ')' java.lang.IllegalArgumentException:期待IdClass映射 - java.lang.IllegalArgumentException: expecting IdClass mapping java.lang.IllegalArgumentException:启动tomcat时需要'dataSource'或'jdbcTemplate' - java.lang.IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required when starting tomcat 异常 java.lang.IllegalArgumentException: is not an interface 使用动态代理时 - Exception java.lang.IllegalArgumentException: is not an interface when using dynamic proxies Zookeeper - 跟随领导者时出现异常 java.lang.IllegalArgumentException - Zookeeper - Exception when following the leader java.lang.IllegalArgumentException 奇怪的java.lang.IllegalArgumentException异常 - Weird java.lang.IllegalArgumentException exception XQuery Saxon 异常 (java.lang.IllegalArgumentException) - XQuery Saxon Exception (java.lang.IllegalArgumentException) 服务调用上的java.lang.IllegalArgumentException - java.lang.IllegalArgumentException on service call Bean初始化失败; 嵌套异常为java.lang.IllegalArgumentException:切入点格式不正确:期望')' - Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting ')' Android:java.lang.IllegalArgumentException:服务未注册 - Android: java.lang.IllegalArgumentException: Service not registered
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM