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

NullPointerException in Github branch source plugin after upgrading

    XMLWordPrintable

    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

            jzila John Zila created issue -
            jzila John Zila made changes -
            Field Original Value New Value
            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:
            {noformat}
            Failed Loading item kbfs-server
            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)
            {noformat}
            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 works as it should.

            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.
            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:
            {noformat}
            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)
            {noformat}
            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 works as it should.

            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.
            jzila John Zila made changes -
            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:
            {noformat}
            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)
            {noformat}
            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 works as it should.

            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.
            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:
            {noformat}
            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)
            {noformat}
            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.
            splashnenen Alexandre Aubert made changes -
            Priority Major [ 3 ] Blocker [ 1 ]
            Hide
            splashnenen Alexandre Aubert added a comment -

            Same problem here since Jenkins 2.41 upgrade. Also followed the documentation to upgrade all plugins simultaneously.
            Upgrade went fine then multibranch pipeline jobs have disappeared.

            Log is :

            janv. 19, 2017 3:25:00 PM hudson.model.ItemGroupMixIn loadChildren
            WARNING: could not load E:\Jenkins\jobs\DataViz\jobs\VegaWebApp\jobs\Vega-Deploy
            java.lang.NullPointerException
            at jenkins.branch.MultiBranchProject.onLoad(MultiBranchProject.java:171)
            at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:122)
            at com.cloudbees.hudson.plugins.folder.AbstractFolder.onLoad(AbstractFolder.java:484)
            at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:107)
            at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:122)
            at com.cloudbees.hudson.plugins.folder.AbstractFolder.onLoad(AbstractFolder.java:484)
            at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:107)
            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(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)

            Any help would be appreciated, as it's more than annoying for us !
            Regards,

            Show
            splashnenen Alexandre Aubert added a comment - Same problem here since Jenkins 2.41 upgrade. Also followed the documentation to upgrade all plugins simultaneously. Upgrade went fine then multibranch pipeline jobs have disappeared. Log is : janv. 19, 2017 3:25:00 PM hudson.model.ItemGroupMixIn loadChildren WARNING: could not load E:\Jenkins\jobs\DataViz\jobs\VegaWebApp\jobs\Vega-Deploy java.lang.NullPointerException at jenkins.branch.MultiBranchProject.onLoad(MultiBranchProject.java:171) at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:122) at com.cloudbees.hudson.plugins.folder.AbstractFolder.onLoad(AbstractFolder.java:484) at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:107) at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:122) at com.cloudbees.hudson.plugins.folder.AbstractFolder.onLoad(AbstractFolder.java:484) at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:107) 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(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Any help would be appreciated, as it's more than annoying for us ! Regards,
            Hide
            jzila John Zila added a comment -

            OK it's worse than I thought. My workaround doesn't actually work because the "new" build I've created starts with nextBuildNumber == 1. That means that as soon as it notices higher build numbers, it hits https://issues.jenkins-ci.org/browse/JENKINS-15761. Since I can't reload the configuration from disk without destroying the build, I'm stuck.

            Show
            jzila John Zila added a comment - OK it's worse than I thought. My workaround doesn't actually work because the "new" build I've created starts with nextBuildNumber == 1. That means that as soon as it notices higher build numbers, it hits https://issues.jenkins-ci.org/browse/JENKINS-15761 . Since I can't reload the configuration from disk without destroying the build, I'm stuck.
            Hide
            stephenconnolly Stephen Connolly added a comment -

            Try building a SNAPSHOT of the current master branch of branch-api. https://github.com/jenkinsci/branch-api-plugin/commit/a2c58a7949c2fe301f43ba8d7276207ef0e3e526

            Show
            stephenconnolly Stephen Connolly added a comment - Try building a SNAPSHOT of the current master branch of branch-api. https://github.com/jenkinsci/branch-api-plugin/commit/a2c58a7949c2fe301f43ba8d7276207ef0e3e526
            Hide
            stephenconnolly Stephen Connolly added a comment -

            Stupid phone. JENKINS-41209 was a similar NPE I fixed this morning (UTC time zone)

            Show
            stephenconnolly Stephen Connolly added a comment - Stupid phone. JENKINS-41209 was a similar NPE I fixed this morning (UTC time zone)
            Hide
            jzila John Zila added a comment -

            Building now. I have to reset the nextBuildNumber for all builds first though.

            Show
            jzila John Zila added a comment - Building now. I have to reset the nextBuildNumber for all builds first though.
            Hide
            jzila John Zila added a comment - - edited

            Stephen Connolly: Doesn't load the plugin successfully. I'll install the SNAPSHOT of SCM API as well.

            Branch API Plugin v2.0.2-SNAPSHOT (private-a2c58a79-jzila)
            SCM API Plugin v2.0.1-beta-3 is older than required. To fix, install v2.0.1 or later.
            
            Show
            jzila John Zila added a comment - - edited Stephen Connolly : Doesn't load the plugin successfully. I'll install the SNAPSHOT of SCM API as well. Branch API Plugin v2.0.2-SNAPSHOT (private-a2c58a79-jzila) SCM API Plugin v2.0.1-beta-3 is older than required. To fix, install v2.0.1 or later.
            jzila John Zila made changes -
            Hide
            jzila John Zila added a comment -

            Stephen Connolly: No bueno:

            Jan 19, 2017 8:02:12 PM SEVERE jenkins.InitReactorRunner$1 onTaskFailed
            Failed Loading item kbfs
            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)
            

            Show
            jzila John Zila added a comment - Stephen Connolly : No bueno: Jan 19, 2017 8:02:12 PM SEVERE jenkins.InitReactorRunner$1 onTaskFailed Failed Loading item kbfs 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)
            Hide
            stephenconnolly Stephen Connolly added a comment -

            Can you post or mail me (firstname dot lastname at cloudbees dot com) the config.xml of the branch job in question. I need to see the malformed XML to fix

            Show
            stephenconnolly Stephen Connolly added a comment - Can you post or mail me (firstname dot lastname at cloudbees dot com) the config.xml of the branch job in question. I need to see the malformed XML to fix
            Hide
            stephenconnolly Stephen Connolly added a comment -

            There is also probably a log message in the data migration admin screen... that log message is the actual root cause... but I can reproduce from the xml... even just the

            <branch> part should be enough to figure out the root cause.

            The issue is the <branch> is failing to deserialize due to some exception being thrown. Same class of problem as JENKINS-411209 but perhaps somewhere else

            <branch class="jenkins.branch.Branch$Dead" plugin="branch-api@1.12-SNAPSHOT">
            "
                            + "        <sourceId>::NullSCMSource::</sourceId>\n"
                            + "        <head class=\"org.jenkinsci.plugins.github_branch_source.BranchSCMHead\" "
                            + "plugin=\"github-branch-source@1.11-SNAPSHOT\">\n"
                            + "          <name>quicker</name>\n"
                            + "        </head>\n"
                            + "        <scm class=\"hudson.scm.NullSCM\"/>\n"
                            + "        <properties class=\"java.util.concurrent.CopyOnWriteArrayList\">\n"
                            + "          <jenkins.branch.NoTriggerBranchProperty/>\n"
                            + "        </properties>\n"
                            + "      </branch>
            
            Show
            stephenconnolly Stephen Connolly added a comment - There is also probably a log message in the data migration admin screen... that log message is the actual root cause... but I can reproduce from the xml... even just the <branch> part should be enough to figure out the root cause. The issue is the <branch> is failing to deserialize due to some exception being thrown. Same class of problem as JENKINS-411209 but perhaps somewhere else <branch class= "jenkins.branch.Branch$Dead" plugin= "branch-api@1.12-SNAPSHOT" > " + " <sourceId>::NullSCMSource::</sourceId>\n" + " <head class=\" org.jenkinsci.plugins.github_branch_source.BranchSCMHead\ " " + "plugin=\" github-branch-source@1.11-SNAPSHOT\ ">\n" + " <name>quicker</name>\n" + " </head>\n" + " <scm class=\" hudson.scm.NullSCM\ "/>\n" + " <properties class=\" java.util.concurrent.CopyOnWriteArrayList\ ">\n" + " <jenkins.branch.NoTriggerBranchProperty/>\n" + " </properties>\n" + " </branch>
            Hide
            jzila John Zila added a comment -

            Emailed

            Show
            jzila John Zila added a comment - Emailed
            Hide
            jzila John Zila added a comment -

            I don't see a data migration admin screen. Where would that be?

            Show
            jzila John Zila added a comment - I don't see a data migration admin screen. Where would that be?
            Hide
            jzila John Zila added a comment -

            If you mean the "Manage Old Data" admin screen, then that one is empty.

            Show
            jzila John Zila added a comment - If you mean the "Manage Old Data" admin screen, then that one is empty.
            jglick Jesse Glick made changes -
            Assignee Stephen Connolly [ stephenconnolly ]
            Hide
            jzila John Zila added a comment -

            Thanks for all your help Stephen.

            My issue was partially because I was running beta versions of the plugins before so the upgrade path wasn't anticipated. I recovered my jobs from backup. After running the recommended master SNAPSHOT from the JENKINS-41209 fix, the jobs loaded correctly.

            Show
            jzila John Zila added a comment - Thanks for all your help Stephen. My issue was partially because I was running beta versions of the plugins before so the upgrade path wasn't anticipated. I recovered my jobs from backup. After running the recommended master SNAPSHOT from the JENKINS-41209 fix, the jobs loaded correctly.
            jzila John Zila made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            recampbell Ryan Campbell made changes -
            Epic Link JENKINS-41234 [ 177999 ]
            Hide
            splashnenen Alexandre Aubert added a comment -

            Hi,
            I can see that this issue has been solved but i don't see any update available, even on experimental update center. Could you advise on what i should to fix the pb on my jenkins instance ?
            Thanks

            Show
            splashnenen Alexandre Aubert added a comment - Hi, I can see that this issue has been solved but i don't see any update available, even on experimental update center. Could you advise on what i should to fix the pb on my jenkins instance ? Thanks
            Hide
            stephenconnolly Stephen Connolly added a comment -

            Alexandre Acebedo login to your Jenkins server. Go to the JENKINS_HOME/jobs directory and find the multi-branch project that is throwing this exception.

            Check the branches, if any of the branches have

            <?xml version='1.0' encoding='UTF-8'?>
            <flow-definition plugin="workflow-job@2.9">
              <actions/>
              <keepDependencies>false</keepDependencies>
              <properties>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty plugin="workflow-multibranch@2.10-beta-1"/>
                <jenkins.model.BuildDiscarderProperty>
                  <strategy class="hudson.tasks.LogRotator">
                    <daysToKeep>10</daysToKeep>
                    <numToKeep>30</numToKeep>
                    <artifactDaysToKeep>-1</artifactDaysToKeep>
            ...
            

            The bit you are checking for is and empty org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty tag.

            If you have an empty org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty tag then you need to restore that from backup (if you don't have a backup you will need to do some other stuff - so email me (see earlier comments for address) )

            If you do not have an empty tag then check the plugin versions you are running. Most likely you have some beta versions of the SCM API related plugins.

            In all cases, you will need to manually download and update the plugins to the versions in https://www.dropbox.com/sh/ppjyc289rnnpfhx/AAA3msLPH2WhBGvL8990H4l5a?dl=0 and you will need to update branch-api to the current master branch -SNAPSHOT. But probably better if you can report the plugin versions you have on this ticket before upgrading anything and I will check back in 35min (school drop-off run)

            Show
            stephenconnolly Stephen Connolly added a comment - Alexandre Acebedo login to your Jenkins server. Go to the JENKINS_HOME/jobs directory and find the multi-branch project that is throwing this exception. Check the branches, if any of the branches have <?xml version= '1.0' encoding= 'UTF-8' ?> <flow-definition plugin= "workflow-job@2.9" > <actions/> <keepDependencies> false </keepDependencies> <properties> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty plugin= "workflow-multibranch@2.10-beta-1" /> <jenkins.model.BuildDiscarderProperty> <strategy class= "hudson.tasks.LogRotator" > <daysToKeep>10</daysToKeep> <numToKeep>30</numToKeep> <artifactDaysToKeep>-1</artifactDaysToKeep> ... The bit you are checking for is and empty org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty tag. If you have an empty org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty tag then you need to restore that from backup (if you don't have a backup you will need to do some other stuff - so email me (see earlier comments for address) ) If you do not have an empty tag then check the plugin versions you are running. Most likely you have some beta versions of the SCM API related plugins. In all cases, you will need to manually download and update the plugins to the versions in https://www.dropbox.com/sh/ppjyc289rnnpfhx/AAA3msLPH2WhBGvL8990H4l5a?dl=0 and you will need to update branch-api to the current master branch -SNAPSHOT. But probably better if you can report the plugin versions you have on this ticket before upgrading anything and I will check back in 35min (school drop-off run)
            Hide
            splashnenen Alexandre Aubert added a comment - - edited

            Thanks for this information. I checked all branches and "org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" is well populated. Here is an example :

            <?xml version='1.0' encoding='UTF-8'?>
            <flow-definition plugin="workflow-job@2.9">
            <actions/>
            <keepDependencies>false</keepDependencies>
            <properties>
            <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty plugin="workflow-multibranch@2.10">
            <branch plugin="branch-api@2.0.0">
            <sourceId>8a58dd48-3cfc-45af-b750-2d47224545cd</sourceId>
            <head plugin="scm-api@2.0.1">
            <name>dev</name>
            </head>
            <scm class="hudson.plugins.git.GitSCM" plugin="git@3.0.2">
            <configVersion>2</configVersion>
            <userRemoteConfigs>
            <hudson.plugins.git.UserRemoteConfig>
            <name>origin</name>
            <refspec>+refs/heads/:refs/remotes/origin/</refspec>
            <url>http://serverurl/DataViz/vega.git</url>
            <credentialsId>7bc32aa3-2c7d-44d1-8689-a1f2131e22ff</credentialsId>
            </hudson.plugins.git.UserRemoteConfig>
            </userRemoteConfigs>
            <branches class="singleton-list">
            <hudson.plugins.git.BranchSpec>
            <name>dev</name>
            </hudson.plugins.git.BranchSpec>
            </branches>
            <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
            <submoduleCfg class="empty-list"/>
            <extensions/>
            </scm>
            <properties/>
            <actions/>
            </branch>
            </org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty>
            </properties>
            <definition class="org.jenkinsci.plugins.workflow.multibranch.SCMBinder" plugin="workflow-multibranch@2.10"/>
            <triggers/>
            </flow-definition>

            Here are the versions of installed plugins, as displayed in update center :

            SCM API 2.0.1
            Github Branch Source 2.0.0
            GitHub Organization Folder Plugin 1.6
            Branch API 2.0.0
            GitHub API 1.84

            the only beta versions i have are related to BlueOcean, i don't think it could have an effect on that.

            Show
            splashnenen Alexandre Aubert added a comment - - edited Thanks for this information. I checked all branches and "org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" is well populated. Here is an example : <?xml version='1.0' encoding='UTF-8'?> <flow-definition plugin="workflow-job@2.9"> <actions/> <keepDependencies>false</keepDependencies> <properties> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty plugin="workflow-multibranch@2.10"> <branch plugin="branch-api@2.0.0"> <sourceId>8a58dd48-3cfc-45af-b750-2d47224545cd</sourceId> <head plugin="scm-api@2.0.1"> <name>dev</name> </head> <scm class="hudson.plugins.git.GitSCM" plugin="git@3.0.2"> <configVersion>2</configVersion> <userRemoteConfigs> <hudson.plugins.git.UserRemoteConfig> <name>origin</name> <refspec>+refs/heads/ :refs/remotes/origin/ </refspec> <url> http://serverurl/DataViz/vega.git </url> <credentialsId>7bc32aa3-2c7d-44d1-8689-a1f2131e22ff</credentialsId> </hudson.plugins.git.UserRemoteConfig> </userRemoteConfigs> <branches class="singleton-list"> <hudson.plugins.git.BranchSpec> <name>dev</name> </hudson.plugins.git.BranchSpec> </branches> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <submoduleCfg class="empty-list"/> <extensions/> </scm> <properties/> <actions/> </branch> </org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty> </properties> <definition class="org.jenkinsci.plugins.workflow.multibranch.SCMBinder" plugin="workflow-multibranch@2.10"/> <triggers/> </flow-definition> Here are the versions of installed plugins, as displayed in update center : SCM API 2.0.1 Github Branch Source 2.0.0 GitHub Organization Folder Plugin 1.6 Branch API 2.0.0 GitHub API 1.84 the only beta versions i have are related to BlueOcean, i don't think it could have an effect on that.
            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
            stephenconnolly Stephen Connolly made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-1891 (Web Link)" [ 18524 ]

              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: