timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-30761] CLONE - Jobs not loading after changing 'Build Record Root Directory' under 'Manage Jenkins' page #7534

Open timja opened 8 years ago

timja commented 8 years ago

After changing the 'Build Record Root Directory' from the default to 'H:\Application Data\Jenkins\${ITEM_FULLNAME}\builds' (a mapped drive) the existing job configuration will no longer load. All the job directories are there.

If I change it back to the default, all the job records are read.

Do I need to change anything else?

My C: drive is is 99% and we mus tbe able to move the builds directories to a larger disk.

This is an extract from the log:

21-May-2013 21:32:46 jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Loading job CDW_CDW_2.0.0
java.lang.NullPointerException
at hudson.model.RunMap.load(RunMap.java:216)
at hudson.model.AbstractProject.onLoad(AbstractProject.java:255)
at hudson.model.Items.load(Items.java:115)
at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:99)
at hudson.plugins.promoted_builds.JobPropertyImpl.setOwner(JobPropertyImpl.java:145)
at hudson.plugins.promoted_builds.JobPropertyImpl.setOwner(JobPropertyImpl.java:41)
at hudson.model.Job.onLoad(Job.java:194)
at hudson.model.AbstractProject.onLoad(AbstractProject.java:252)
at hudson.model.Project.onLoad(Project.java:88)
at hudson.model.Items.load(Items.java:115)
at jenkins.model.Jenkins$15.run(Jenkins.java:2437)
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$6.runTask(Jenkins.java:838)
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$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Originally reported by robertoprevato, imported from: CLONE - Jobs not loading after changing 'Build Record Root Directory' under 'Manage Jenkins' page
  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2022/01/10
timja commented 8 years ago

robertoprevato:

I can confirm that this bug is outstanding: I first experienced it using Jenkins version 1.624, then tried to update to 1.631 with no luck.
Here what I did:

  1. I set up few jobs, using custom workspaces but with default Jenkins configuration (i.e. Build Record Root Directory = ${ITEM_ROOTDIR}/builds)
  2. Jobs were running fine; without any problem
  3. At some point, Jenkins displayed a message, inviting to free some space in its working directory; therefore I decided to change the Build Record Directory to a custom directory, into something like: D:\SomeFolder\Builds\${ITEM_FULLNAME}; and the default workspace root directory to something like: D:\SomeFolder\Workspaces\${ITEM_FULLNAME}
    (this didn't affect the jobs I defined, since they already had custom workspaces)
  4. Saved my changes; Jenkins displayed a success message
  5. Jenkins created for me the directories, with links to the previous builds
    Since then, I am not able to run any job, when I start one they stay in: "Pending - Waiting for next available executor".
    I tried to revert the changed back to the default values, with no luck; I also verified that the number of executors didn't change: it is always 2, like it used to be.
    I tried also to restart the Jenkins service, and also to create a new job, but also the new job fails to start.

[UPDATE]
I just noticed that the original creator of this ticket was speaking about something different: in my case the jobs configuration is loaded, but they never start. Sorry for my mistake in cloning it.

timja commented 8 years ago

robertoprevato:

I managed to resolve the problem using the web interface, by doing the following:

  1. Going to the Jenkins configuration and clicking on the button "Reload configuration from disk";
  2. Going to the build executor status page; I noticed that the master was in "dead" state; I clicked on its name and it changed

I am not sure which of the two things resolved the problem; but the problem definitely happened after I changed the configuration.