Hi I have installed github oauth plugin in jenkins, but due to improper settings , I needed to restart the jenkins.
I replaced <useSecurity>true</useSecurity>
with <useSecurity>false</useSecurity>
and tried to restart.
But the jenkins server restart fail with the following error.Please help with a solution. Thanks in advance.
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)
Solved the problem.
Go to line 122 in /etc/init.d/jenkins
Replace
$SU -l $JENKINS_USER --shell=/bin/bash -c "$DAEMON $DAEMON_ARGS -- $JAVA $JAVA_ARGS -jar $JENKINS_WAR $JENKINS_ARGS" || return 2
To
$SU -l $JENKINS_USER --shell=/bin/bash -c "$DAEMON $DAEMON_ARGS -- $JAVA $JAVA_ARGS -jar $JENKINS_WAR $JENKINS_ARGS --ajp13Port=-1" || return 2