Hudson jobs missing after a crash!? Restore them from the ashes

Blog Categories: 

This morning, the VM containing the master of our Hudson instance froze. I "powered it off" and then restarted...ah, Hudson restarted and the list of jobs appeared. No, oh no, not all the jobs! Some of them vanished. Noooooo...

Wait, don't panic, this blog post provides an explanation of how to raise Hudson jobs from their ashes!

How to find the issue

On the main Hudson page, go to Manage Hudson --> System Log --> All Hudson logs

You will find this kind of error:

SEVERE: Failed Loading job XXX-JOBNAME-XXX
hudson.util.IOException2: /var/lib/hudson/jobs/XXX-JOBNAME-XXX/nextBuildNumber doesn't contain a number
at hudson.model.Job.onLoad(
at hudson.model.AbstractProject.onLoad(
at hudson.model.BaseBuildableProject.onLoad(
at hudson.model.Items.load(
at hudson.model.Hudson$
at org.jvnet.hudson.reactor.TaskGraphBuilder$
at org.jvnet.hudson.reactor.Reactor.runTask(
at hudson.model.Hudson$4.runTask(
at org.jvnet.hudson.reactor.Reactor$
at org.jvnet.hudson.reactor.Reactor$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(
at java.lang.Integer.parseInt(
at java.lang.Integer.parseInt(
at hudson.model.Job.onLoad(
... 12 more
In fact, the file nextBuildNumber mentioned in the stack is empty.

How to restore jobs

It is really simple (but can be really tedious if you have a lot of missing jobs).

Put a number in nextBuildNumber files for each job mentioned in the logs.

Be sure to put a number higher than the last job run.

Potential improvements

It would be nice to have the job visible in the job list even if the nextBuildNumber file is corrupted. Perhaps we could put a warning decorator on this job, and also put an arbitrary value in this file from the UI.

I suppose the files were corrupted because the jobs were running when the VM crashed. So, it seems that this file is empty when a job is running. Could we prevent it from being "empty" for too long, and so minimize the opportunity for corruption in the event of a crash?

Add your 2 cents!

To continue this discussion, come on over to the Eclipse forum and share your ideas. I opened a topic just for this :-)

Note: you might also have issues with fingerprints, but it shouldn't be a blocking point. See this topic on the Eclipse forum for more details.


Submitted by HarleyFlynn on Fri, 04/12/2019 - 13:48

All you need is a just nice resume — nothing else. And here there are two ways. First, you can learn about resume writing tips on any suitable resource. Why not? Read about keywords, structure, and words choosing. And you would certainly write some text. And there is another way. You can just click the link boomessays . And choose one of that resource. Each resource is supposed to be one of the best writing resources. You need to choose which one do you prefer.