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

0 stars 0 forks source link

[JENKINS-2207] Hudson loses builds when tomcat is restarted #8767

Closed timja closed 14 years ago

timja commented 16 years ago

When on windows we use the tomcat gui (version 5.5.23) to stop and start the
tomcat service again, hudson falls back to an old history of builds and seems to
have lost track of the recent builds before the shutdown. Of course it also
doesn't remove the subfolders of builds when builds are discarded by hudson.


Originally reported by gerritcap, imported from: Hudson loses builds when tomcat is restarted
  • status: Closed
  • priority: Major
  • resolution: Duplicate
  • resolved: 2010-05-30T14:20:40+00:00
  • imported: 2022/01/10
timja commented 16 years ago

kohsuke:

Please check the container log and let us know what exception records you are
getting. Hudson reports the reason why it fails to load build records.

Note that Hudson not deleting those build records is by design.

timja commented 16 years ago

uncletall:

This is probably related to issue 2218. I my case the CI-game tries to get the
results from checkstyle, an exception is thrown and the build.xml file is not
added to the builds/timestamp folder. When tomcat then restarts hudson looks for
the folders that contain build.xml folders, the ones with out are ignored and
result to missing builds

timja commented 15 years ago

mdonohue:

Fix summary spelling

timja commented 14 years ago

xaviou:

I reproduced this issue with Hudson 1.339, ci-game 1.15 and PMD 3.1. Here is the stacktrace during the build:

GRAVE: Executor throw an exception unexpectedly
java.lang.NoClassDefFoundError: hudson/plugins/pmd/util/model/Priority
at hudson.plugins.cigame.rules.plugins.pmd.PmdRuleSet.loadRules(PmdRuleSet.java:14)
at hudson.plugins.cigame.rules.plugins.PluginRuleSet.getRules(PluginRuleSet.java:48)
at hudson.plugins.cigame.model.ScoreCard.record(ScoreCard.java:33)
at hudson.plugins.cigame.model.ScoreCard.record(ScoreCard.java:54)
at hudson.plugins.cigame.GamePublisher.perform(GamePublisher.java:56)
at hudson.plugins.cigame.GamePublisher.perform(GamePublisher.java:42)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:583)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:564)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:551)
at hudson.model.Build$RunnerImpl.cleanUp(Build.java:158)
at hudson.model.Run.run(Run.java:1221)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:122)

The builds with this error do not produce the build.xml file in builds/timestamp folder, and are invisible in the build history.
Some builds are also incorrectly reported as failed , as mentioned in JENKINS-2218 (which could be reopened also I think).
The workaround for the next builds is to disable the pmd plugin. But the old builds are still lost. Is there a workaround to show back these lost builds?

timja commented 14 years ago

ricktonoli:

Reproduced with Hudson 1.339, ci-game 1.15 no PMD though, here's part of the stack I get during startup:

java.lang.NoClassDefFoundError: hudson/plugins/tasks/util/model/Priority
at hudson.plugins.cigame.rules.plugins.opentasks.OpenTasksRuleSet.loadRules(OpenTasksRuleSet.java:14)
at hudson.plugins.cigame.rules.plugins.PluginRuleSet.getRules(PluginRuleSet.java:48)
at hudson.plugins.cigame.model.ScoreCard.record(ScoreCard.java:33)
at hudson.plugins.cigame.model.ScoreCard.record(ScoreCard.java:54)
at hudson.plugins.cigame.GamePublisher.perform(GamePublisher.java:56)
at hudson.plugins.cigame.GamePublisher.perform(GamePublisher.java:42)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:583)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:564)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:551)
at hudson.model.Build$RunnerImpl.cleanUp(Build.java:158)
at hudson.model.Run.run(Run.java:1221)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:122)

If it helps any, I noticed that the builds marked as "keep forever" DO display, but show as broken (even though the console log shows success).

timja commented 14 years ago

ricktonoli:

Removing the ci-game (1.15) plugin prevents this issue from re-occuring (successfully restarted server with no "lost" builds), however, the builds "lost" while the plugin was running (or not) are still "lost". Any hope in getting this info back?

timja commented 14 years ago

ricktonoli:

Found a related bug: JENKINS-5022

Deploying the new ci-game plugin (1.16?) fixes the problem as well. I couldn't find it on the plugin site, but it is available in the related bug: http://people.apache.org/~olamy/hudson/JENKINS-5022/

timja commented 14 years ago

mindless:

sounds like this is resolved by the 5022 fix, so closing.. reopen and provide new details if there is still a problem, thanks.

timja commented 2 years ago

[Duplicates: JENKINS-5022]