NumberFormatException on startup after update


After updating to 2.73.3 or 2.89 or later, Jenkins fails to start with an exception like:

SEVERE: Failed to initialize Jenkins
hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
        at hudson.WebAppMain$
Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
   at org.jvnet.hudson.reactor.Reactor.execute(
   at jenkins.model.Jenkins.executeReactor(
   at jenkins.model.Jenkins.<init>(
   at hudson.model.Hudson.<init>(
   at hudson.model.Hudson.<init>(
   at hudson.WebAppMain$
Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
    at hudson.init.TaskMethodFinder.invoke(
    at hudson.init.TaskMethodFinder$
    at org.jvnet.hudson.reactor.Reactor.runTask(
    at jenkins.model.Jenkins$5.runTask(
    at org.jvnet.hudson.reactor.Reactor$
    at org.jvnet.hudson.reactor.Reactor$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at hudson.init.TaskMethodFinder.invoke(
    ... 8 more
Caused by: java.lang.NumberFormatException: For input string: "foob"
    at java.lang.NumberFormatException.forInputString(
    at java.lang.Integer.parseInt(
    at jenkins.model.IdStrategy$CaseInsensitive.idFromFilename(
    at hudson.model.User$AllUsers.scanAll(
    ... 13 more


Within $JENKINS_HOME/users/, locate the user directory that contains the input string specified in the above NumberFormatException prefixed by a “$” (in the above example, a user containing the string “$foob”). Add 0024 after the “$”. For example, if the error string was “foob”, and you have a user directory called “mynameis$foobar”, you would rename the directory to “mynameis$0024foobar”. Do not alter any other parts of the directory name, even if there are additional “$” characters in the name. Restart your Jenkins instance, and repeat this rename as necessary.

More Information

This is caused by the resolution to SECURITY-499, which was disclosed in the Nov 8, 2017 security advisory and resolved in Jenkins LTS version 2.73.3 and Jenkins weekly release 2.89. This migrates user directories containing special characters to a directory without them. This did not, however, account for usernames containing a “$” beforehand. See also JENKINS-47909.

Have more questions?


Please sign in to leave a comment.