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

Multi-configuration jobs disappear from the list when Jenkins configuration is reloaded from disk

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • Windows 7
      Mac OSX 10.7.4

      Create a simple multi-configuration job. My simplest example that demonstrates this bug has just one user-defined axis, and its build steps do almost nothing (I first saw the bug with a much more complicated job, but I have now found that it happens just the same with a really simple one).

      Save the job configuration. The job can now be used as normal: you can run builds, and you can look at the builds in the list, and so on. Everything seems to be fine.

      Then reload your Jenkins configuration from disk (or, equivalently, restart the Jenkins service from the Windows control panel). The multi-configuration job is no longer present in the list of jobs! If you look at the Jenkins home directory, you'll see the directory structure that Jenkins created for the job, but you can't see any sign of it via the Jenkins user interface.

      I have tried this several times with different settings. It always fails.

      This is with the current release of Jenkins (version 1.474).

          [JENKINS-14474] Multi-configuration jobs disappear from the list when Jenkins configuration is reloaded from disk

          I have the same symptoms and this is in the log:

          18/07/2012 8:44:42 AM jenkins.InitReactorRunner$1 onTaskFailed
          SEVERE: Failed Loading job z_multi
          java.lang.NullPointerException
          at hudson.matrix.MatrixProject.updateTransientActions(MatrixProject.java:431)
          at hudson.model.AbstractProject.onLoad(AbstractProject.java:292)
          at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:466)
          at hudson.model.Items.load(Items.java:115)
          at jenkins.model.Jenkins$17.run(Jenkins.java:2492)
          at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
          at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
          at jenkins.model.Jenkins$7.runTask(Jenkins.java:878)
          at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
          at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:679)

          Matthew Cooper added a comment - I have the same symptoms and this is in the log: 18/07/2012 8:44:42 AM jenkins.InitReactorRunner$1 onTaskFailed SEVERE: Failed Loading job z_multi java.lang.NullPointerException at hudson.matrix.MatrixProject.updateTransientActions(MatrixProject.java:431) at hudson.model.AbstractProject.onLoad(AbstractProject.java:292) at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:466) at hudson.model.Items.load(Items.java:115) at jenkins.model.Jenkins$17.run(Jenkins.java:2492) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:878) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679)

          Matthew Cooper added a comment - - edited

          looks like it has been fixed on trunk so should be in the next drop I guess...

          commit a811f406e785a8c8e6cb4b9246829dce9c7b97ae
          Author: lvotypko <lvotypko@redhat.com>
          Date: Mon Jul 2 14:11:20 2012 +0200

          Fix NPE during loading matrix job

          Matthew Cooper added a comment - - edited looks like it has been fixed on trunk so should be in the next drop I guess... commit a811f406e785a8c8e6cb4b9246829dce9c7b97ae Author: lvotypko <lvotypko@redhat.com> Date: Mon Jul 2 14:11:20 2012 +0200 Fix NPE during loading matrix job

          Sarah Woodall added a comment - - edited

          I have tried this again with "Jenkins ver. 1.475-SNAPSHOT (rc-07/11/2012 15:57 GMT-kohsuke)"
          It is definitely better: I can now create multi-configuration jobs and restart Jenkins, and they do re-load. However, I can still provoke a NPE by copying old multi-configuration jobs from my old Jenkins machine (running Jenkins 1.441). They seem to be OK at the first reload from disk, but after restarting Jenkins again they no longer load, and the log shows a NPE.

          I have investigated the difference between the jobs. The top-level config.xml files differ slightly. The one created by the new Jenkins has some extra lines near the end of the file.

          This is the new material:
          <executionStrategy class="hudson.matrix.DefaultMatrixExecutionStrategyImpl">
          <runSequentially>false</runSequentially>
          </executionStrategy>

          Sarah Woodall added a comment - - edited I have tried this again with "Jenkins ver. 1.475-SNAPSHOT (rc-07/11/2012 15:57 GMT-kohsuke)" It is definitely better: I can now create multi-configuration jobs and restart Jenkins, and they do re-load. However, I can still provoke a NPE by copying old multi-configuration jobs from my old Jenkins machine (running Jenkins 1.441). They seem to be OK at the first reload from disk, but after restarting Jenkins again they no longer load, and the log shows a NPE. I have investigated the difference between the jobs. The top-level config.xml files differ slightly. The one created by the new Jenkins has some extra lines near the end of the file. This is the new material: <executionStrategy class="hudson.matrix.DefaultMatrixExecutionStrategyImpl"> <runSequentially>false</runSequentially> </executionStrategy>

          Ronen Peleg added a comment -

          This BUG is in 1.473 and 1.474 versions!

          Downgrade Jenkins to version 1.472 and then you will see the lost "multi-configuration" jobs.

          Upgrade Jenkins only when you will see fix for this bug: http://jenkins-ci.org/changelog

          Ronen Peleg added a comment - This BUG is in 1.473 and 1.474 versions! Downgrade Jenkins to version 1.472 and then you will see the lost "multi-configuration" jobs. Upgrade Jenkins only when you will see fix for this bug: http://jenkins-ci.org/changelog

          Sarah Woodall added a comment -

          I think that there are actually two bugs. I have now downgraded to 1.472 as you suggested. The behaviour I see is the same as that of the 1.475 release candidate that I was trying before (see my earlier comment for details). So I agree that the really serious bug does not seem to be present in that version.

          But I am still getting null pointer exceptions when Jenkins tries to load my old multi-configuration jobs, which I created in my old Jenkins system. I can live with this, because I haven't got many of those jobs, and I can re-create them manually.

          Sarah Woodall added a comment - I think that there are actually two bugs. I have now downgraded to 1.472 as you suggested. The behaviour I see is the same as that of the 1.475 release candidate that I was trying before (see my earlier comment for details). So I agree that the really serious bug does not seem to be present in that version. But I am still getting null pointer exceptions when Jenkins tries to load my old multi-configuration jobs, which I created in my old Jenkins system. I can live with this, because I haven't got many of those jobs, and I can re-create them manually.

          Ronen Peleg added a comment -

          As I wrote to you, I had the same issues like yours and I downgraded to 1.472, only then everything back to normal (I was able to see "multi-configuration" jobs.

          I recommended to you to actually copy the jenkins.war (1.472) and not to use the Jenkins downgrade option.

          This is what I did:

          1. Stop Jenkins service.
          2. Copy (from backup) the jenkins.war (1.472) to Jenkins home folder (c:\Jenkins).
          3. Start Jenkins service.

          After you downgrade to 1.472, try to create a new "multi-configuration" job and see (after restart Jenkins) if the job staying stable. if its working, try to copy the config.xml from your old "multi-configuration" job to the new "multi-configuration" job.

          In any case, this bug must be solved ASAP!

          Ronen Peleg added a comment - As I wrote to you, I had the same issues like yours and I downgraded to 1.472, only then everything back to normal (I was able to see "multi-configuration" jobs. I recommended to you to actually copy the jenkins.war (1.472) and not to use the Jenkins downgrade option. This is what I did: 1. Stop Jenkins service. 2. Copy (from backup) the jenkins.war (1.472) to Jenkins home folder (c:\Jenkins). 3. Start Jenkins service. After you downgrade to 1.472, try to create a new "multi-configuration" job and see (after restart Jenkins) if the job staying stable. if its working, try to copy the config.xml from your old "multi-configuration" job to the new "multi-configuration" job. In any case, this bug must be solved ASAP!

          Sarah Woodall added a comment -

          Yes. That's exactly what I did. And, indeed, I can create new multi-config jobs and they do stay stable, so I can use this version.

          But I still have the other problem I mentioned: my old multi-config jobs that I created on my old system (Jenkins 1.441) and copied over to the new machine won't load. Jenkins gives a null-pointer exception when it tries to load them. So there is a separate bug to do with loading these old jobs. I should raise a separate bug report for that one, but at the moment I haven't done so, because the two issues seem to be so closely related. I thought it was better to wait and see what happens with this report first.

          Sarah Woodall added a comment - Yes. That's exactly what I did. And, indeed, I can create new multi-config jobs and they do stay stable, so I can use this version. But I still have the other problem I mentioned: my old multi-config jobs that I created on my old system (Jenkins 1.441) and copied over to the new machine won't load. Jenkins gives a null-pointer exception when it tries to load them. So there is a separate bug to do with loading these old jobs. I should raise a separate bug report for that one, but at the moment I haven't done so, because the two issues seem to be so closely related. I thought it was better to wait and see what happens with this report first.

          Ronen Peleg added a comment - - edited

          Maybe your old multi-config jobs requests for plugins that not including (exist) in your NEW Jenkins system.
          Check and make sure that you have the same system settings and plugins like in you had in the old Jenkins system.

          Ronen Peleg added a comment - - edited Maybe your old multi-config jobs requests for plugins that not including (exist) in your NEW Jenkins system. Check and make sure that you have the same system settings and plugins like in you had in the old Jenkins system.

          Ronen Peleg added a comment -

          Update to Jenkins 1.4.75+ to solve this issue.

          Ronen Peleg added a comment - Update to Jenkins 1.4.75+ to solve this issue.

            ronenpg Ronen Peleg
            sarahwoodall Sarah Woodall
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: