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

NullPointerException in Github branch source plugin after upgrading

    Details

    • Similar Issues:

      Description

      I upgraded according to the guide, and suddenly all my multibranch jobs are gone from Jenkins. I look at the logs and see this for each of my job types:

      Failed Loading item <job name>
      java.lang.NullPointerException
      	at jenkins.branch.MultiBranchProject.onLoad(MultiBranchProject.java:171)
      	at hudson.model.Items.load(Items.java:372)
      	at jenkins.model.Jenkins$17.run(Jenkins.java:3061)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      	at jenkins.model.Jenkins$7.runTask(Jenkins.java:1066)
      	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)
      

      I can recreate the jobs with the same names, upon which Jenkins reindexes from GitHub, "finds" the jobs for still-open branches and PRs, including their whole histories, and everything else works as it should. Old jobs still don't re-appear.

      But then when I restart Jenkins they're all gone again, and I have to do the whole dance again.

      As you can imagine, this is incredibly frustrating and a terrible time sink. What can I do to fix this, short of creating brand new jobs with lost history? I've tried to downgrade but the dependencies are too entangled. I have a backup of my plugin directory and plugin configs, but I'd really rather avoid regressive steps like that.

        Attachments

          Issue Links

            Activity

            Hide
            stephenconnolly Stephen Connolly added a comment -

            OK then in that case it is probably the JENKINS-41209 issue that is affecting you. I'll cut a beta release with that as it is at least merged to master

            Show
            stephenconnolly Stephen Connolly added a comment - OK then in that case it is probably the JENKINS-41209 issue that is affecting you. I'll cut a beta release with that as it is at least merged to master
            Hide
            stephenconnolly Stephen Connolly added a comment - - edited

            alexandre aubert https://www.dropbox.com/sh/ppjyc289rnnpfhx/AAA3msLPH2WhBGvL8990H4l5a?dl=0 has the 2.0.2-beta-1 release of branch-api now (with the fix for JENKINS-41209 which is what it looks like you have). Should be fine to upgrade and restart (you'll still have JENKINS-41121 though)

            Show
            stephenconnolly Stephen Connolly added a comment - - edited alexandre aubert https://www.dropbox.com/sh/ppjyc289rnnpfhx/AAA3msLPH2WhBGvL8990H4l5a?dl=0 has the 2.0.2-beta-1 release of branch-api now (with the fix for JENKINS-41209 which is what it looks like you have). Should be fine to upgrade and restart (you'll still have JENKINS-41121 though)
            Hide
            splashnenen Alexandre Aubert added a comment -

            after this install and restart of master, job is well back in display. There were some errors on trying to delete some items :

            WARNING: Failed to update org.jenkinsci.plugins.workflow.job.WorkflowJob@6ed3c55b[DataViz/VegaWebApp/Vega-Deploy/story-FH-88114-table-data.h05ibd] lastSuccessfulBuild permalink for DataViz/VegaWebApp/Vega-Deploy/story-FH-88114-table-data.h05ibd #10

            java.io.IOException: Unable to delete 'E:\Jenkins\jobs\DataViz\jobs\VegaWebApp\jobs\Vega-Deploy\branches\story-FH-88114-table-data.h05ibd\builds\lastSuccessfulBuild'. Tried 3 times (of a maximum of 3) waiting 0,1 s between attempts.

            I have a lot of those on different jobs, i don't if it's related to already identified issues.
            In any case, thanks for your help, we are now able to run our jobs.

            Regards,

            Show
            splashnenen Alexandre Aubert added a comment - after this install and restart of master, job is well back in display. There were some errors on trying to delete some items : WARNING: Failed to update org.jenkinsci.plugins.workflow.job.WorkflowJob@6ed3c55b [DataViz/VegaWebApp/Vega-Deploy/story-FH-88114-table-data.h05ibd] lastSuccessfulBuild permalink for DataViz/VegaWebApp/Vega-Deploy/story-FH-88114-table-data.h05ibd #10 java.io.IOException: Unable to delete 'E:\Jenkins\jobs\DataViz\jobs\VegaWebApp\jobs\Vega-Deploy\branches\story-FH-88114-table-data.h05ibd\builds\lastSuccessfulBuild'. Tried 3 times (of a maximum of 3) waiting 0,1 s between attempts. I have a lot of those on different jobs, i don't if it's related to already identified issues. In any case, thanks for your help, we are now able to run our jobs. Regards,
            Hide
            stephenconnolly Stephen Connolly added a comment - - edited

            alexandre aubert OK cool so your issue was JENKINS-41209 and not this issue.

            The permalink issue is probably just a windows file locking problem and "normal" (i.e. unrelated to SCM API changes)

            Show
            stephenconnolly Stephen Connolly added a comment - - edited alexandre aubert OK cool so your issue was JENKINS-41209 and not this issue. The permalink issue is probably just a windows file locking problem and "normal" (i.e. unrelated to SCM API changes)
            Hide
            stephenconnolly Stephen Connolly added a comment -

            scm-api-2.0.2
            git-2.6.4 or git-3.0.4
            branch-api-2.0.2
            bitbucket-branch-source-2.0.2
            github-branch-source-2.0.1
            cloudbees-folder-5.17
            workflow-multibranch-2.11

            Show
            stephenconnolly Stephen Connolly added a comment - scm-api-2.0.2 git-2.6.4 or git-3.0.4 branch-api-2.0.2 bitbucket-branch-source-2.0.2 github-branch-source-2.0.1 cloudbees-folder-5.17 workflow-multibranch-2.11

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                jzila John Zila
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: