安装 github oauth 插件后,jenkins 在 ubuntu 中重启失败

安装 github oauth 插件后,jenkins 在 ubuntu 中重启失败

嗨,我在 jenkins 中安装了 github oauth 插件,但由于设置不正确,我需要重新启动 jenkins。我将其替换<useSecurity>true</useSecurity><useSecurity>false</useSecurity>并尝试重新启动。但 jenkins 服务器重新启动失败并出现以下错误。请帮助解决。提前致谢。

SEVERE: Container startup failed
java.io.IOException: Failed to start a listener: winstone.Ajp13ConnectorFactory
    at winstone.Launcher.spawnListener(Launcher.java:207)
    at winstone.Launcher.<init>(Launcher.java:148)
    at winstone.Launcher.main(Launcher.java:352)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at Main._main(Main.java:246)
    at Main.main(Main.java:91)
Caused by: java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:504)
    at java.lang.Integer.parseInt(Integer.java:527)
    at winstone.cmdline.Option.intArg(Option.java:291)
    at winstone.cmdline.Option$OInt.get(Option.java:203)
    at winstone.Ajp13ConnectorFactory.start(Ajp13ConnectorFactory.java:24)
    at winstone.Launcher.spawnListener(Launcher.java:205)

答案1

问题解决了。

转到 /etc/init.d/jenkins 中的第 122 行

代替 $SU -l $JENKINS_USER --shell=/bin/bash -c "$DAEMON $DAEMON_ARGS -- $JAVA $JAVA_ARGS -jar $JENKINS_WAR $JENKINS_ARGS" || return 2

$SU -l $JENKINS_USER --shell=/bin/bash -c "$DAEMON $DAEMON_ARGS -- $JAVA $JAVA_ARGS -jar $JENKINS_WAR $JENKINS_ARGS --ajp13Port=-1" || return 2

相关内容