Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47909

Last master version 2.73.3 won't start when usernames contain $

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: core
    • Environment:
      Docker: jenkins/jenkins:2.73.3-alpine
      Kubernetes: GKE v1.8.1-gke.0

      Upgrade from: jenkins/jenkins:2.73.2-alpine
    • Similar Issues:

      Description

      Hi,

      after upgrade our deployment in the last version 2.73.3, i had to rollback in 2.73.2.

      The master won't start:

       

      INFO: Loaded all jobs
      Nov 09, 2017 8:40:54 AM jenkins.util.groovy.GroovyHookScript execute
      INFO: Executing /var/jenkins_home/init.groovy.d/tcp-slave-agent-port.groovy
      Nov 09, 2017 8:40:54 AM hudson.model.AsyncPeriodicWork$1 run
      INFO: Started Download metadata
      Nov 09, 2017 8:40:54 AM hudson.model.AsyncPeriodicWork$1 run
      INFO: Finished Download metadata. 37 ms
      Nov 09, 2017 8:40:54 AM jenkins.InitReactorRunner$1 onTaskFailed
      SEVERE: Failed AllUsers.scanAll
      java.lang.Error: java.lang.reflect.InvocationTargetException
       at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
       at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
       at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
       at jenkins.model.Jenkins$7.runTask(Jenkins.java:1090)
       at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
       at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
       ... 8 more
      Caused by: java.lang.NumberFormatException: For input string: "whco"
       at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
       at java.lang.Integer.parseInt(Integer.java:580)
       at jenkins.model.IdStrategy$CaseInsensitive.idFromFilename(IdStrategy.java:306)
       at hudson.model.User$AllUsers.scanAll(User.java:1056)
       ... 13 more
      Nov 09, 2017 8:40:54 AM hudson.util.BootFailure publish
      SEVERE: Failed to initialize Jenkins
      hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
       at hudson.WebAppMain$3.run(WebAppMain.java:252)
      Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
       at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269)
       at jenkins.InitReactorRunner.run(InitReactorRunner.java:47)
       at jenkins.model.Jenkins.executeReactor(Jenkins.java:1124)
       at jenkins.model.Jenkins.<init>(Jenkins.java:929)
       at hudson.model.Hudson.<init>(Hudson.java:86)
       at hudson.model.Hudson.<init>(Hudson.java:82)
       at hudson.WebAppMain$3.run(WebAppMain.java:235)
      Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
       at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
       at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
       at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
       at jenkins.model.Jenkins$7.runTask(Jenkins.java:1090)
       at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
       at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
       ... 8 more
      Caused by: java.lang.NumberFormatException: For input string: "whco"
       at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
       at java.lang.Integer.parseInt(Integer.java:580)
       at jenkins.model.IdStrategy$CaseInsensitive.idFromFilename(IdStrategy.java:306)
       at hudson.model.User$AllUsers.scanAll(User.java:1056)
       ... 13 more
      Nov 09, 2017 8:40:54 AM jenkins.model.Jenkins cleanUp
      INFO: Stopping Jenkins
      Nov 09, 2017 8:40:54 AM jenkins.model.Jenkins$21 onAttained
      INFO: Started termination
      Nov 09, 2017 8:40:54 AM jenkins.model.Jenkins$21 onAttained
      INFO: Completed termination
      Nov 09, 2017 8:40:54 AM jenkins.model.Jenkins _cleanUpDisconnectComputers
      INFO: Starting node disconnection
      Nov 09, 2017 8:40:54 AM jenkins.model.Jenkins _cleanUpShutdownPluginManager
      INFO: Stopping plugin manager
      Nov 09, 2017 8:40:54 AM jenkins.model.Jenkins _cleanUpPersistQueue
      INFO: Persisting build queue
      Nov 09, 2017 8:40:54 AM jenkins.model.Jenkins _cleanUpAwaitDisconnects
      INFO: Waiting for node disconnection completion
      Nov 09, 2017 8:40:54 AM jenkins.model.Jenkins cleanUp
      INFO: Jenkins stopped
      --> setting agent port for jnlp
      Nov 09, 2017 8:41:04 AM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
      SEVERE: A thread (Thread-3/50) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
      java.lang.NullPointerException: Cannot invoke method setSlaveAgentPort() on null object
       at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
       at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
       at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
       at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:35)
       at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
       at tcp-slave-agent-port$_run_closure1.doCall(tcp-slave-agent-port.groovy:10)
       at tcp-slave-agent-port$_run_closure1.doCall(tcp-slave-agent-port.groovy)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
       at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
       at groovy.lang.Closure.call(Closure.java:414)
       at groovy.lang.Closure.call(Closure.java:408)
       at groovy.lang.Closure.run(Closure.java:495)
       at java.lang.Thread.run(Thread.java:745)
      

      The rollback in 2.73.2 has solved the problem.

       

        Attachments

          Issue Links

            Activity

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            A hotfix has been merged towards 2.90.
            I will keep it open, because there may be other action items needed. Jesse Glick please close it if you feel it's fully done.

            Show
            oleg_nenashev Oleg Nenashev added a comment - A hotfix has been merged towards 2.90. I will keep it open, because there may be other action items needed. Jesse Glick please close it if you feel it's fully done.
            Hide
            burtsevyg Yuriy Burtsev added a comment -

            2.73.4 will be cool.

            Show
            burtsevyg Yuriy Burtsev added a comment - 2.73.4 will be cool.
            Hide
            jglick Jesse Glick added a comment -

            Reported bug was fixed. There was discussion about far riskier changes to the entire storage model of users in Jenkins, but that is certainly out of scope here.

            Show
            jglick Jesse Glick added a comment - Reported bug was fixed. There was discussion about far riskier changes to the entire storage model of users in Jenkins, but that is certainly out of scope here.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/java/hudson/model/User.java
            core/src/main/java/jenkins/model/IdStrategy.java
            core/src/test/java/jenkins/model/IdStrategyTest.java
            test/src/test/java/hudson/model/UserTest.java
            test/src/test/resources/hudson/model/UserTest/shellyUsernameMigrated.zip
            http://jenkins-ci.org/commit/jenkins/8058675317d84b51a73e53a9167c6d1660b3314f
            Log:
            Merge pull request #3134 from jglick/IdStrategy-NFE-JENKINS-47909

            JENKINS-47909 Handle false hex escapes

            (cherry picked from commit 7c06a9ba946800151c5d9fc38793ac4bbd3fea5f)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/model/User.java core/src/main/java/jenkins/model/IdStrategy.java core/src/test/java/jenkins/model/IdStrategyTest.java test/src/test/java/hudson/model/UserTest.java test/src/test/resources/hudson/model/UserTest/shellyUsernameMigrated.zip http://jenkins-ci.org/commit/jenkins/8058675317d84b51a73e53a9167c6d1660b3314f Log: Merge pull request #3134 from jglick/IdStrategy-NFE- JENKINS-47909 JENKINS-47909 Handle false hex escapes (cherry picked from commit 7c06a9ba946800151c5d9fc38793ac4bbd3fea5f)
            Hide
            danielbeck Daniel Beck added a comment -
            Show
            danielbeck Daniel Beck added a comment - Late backport into 2.89.1 per https://groups.google.com/d/msg/jenkinsci-dev/VuRTcIqC-Zw/RauLrKI_BQAJ

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                vrobert78 Vincent Robert
              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: