Skip to content

[JENKINS-11563] Jenkins should fail initialization if it can not parse a job history #16200

Closed

Description

@jenkins-infra-bot

If the file

configuration/jobs//nextBuildNumber

is empty, Jenkins will still initialize but the job will "disappear" from the dashboard. This will be logged, but may go unnoticed.

Oct 27, 2011 3:10:24 PM jenkins.model.Jenkins$6 onTaskFailed
SEVERE: Failed Loading job accurev_trigger
hudson.util.IOException2: /configuration/jobs//nextBuildNumber doesn't contain a number


Originally reported by pickgr1, imported from: Jenkins should fail initialization if it can not parse a job history
  • status: Resolved
  • priority: Major
  • component(s): core
  • resolution: Fixed
  • resolved: 2011-11-02T18:16:50+00:00
  • votes: 0
  • watchers: 2
  • imported: 2025-11-24
Raw content of original issue

If the file

configuration/jobs/<job>/nextBuildNumber

is empty, Jenkins will still initialize but the job will "disappear" from the dashboard. This will be logged, but may go unnoticed.

Oct 27, 2011 3:10:24 PM jenkins.model.Jenkins$6 onTaskFailed SEVERE: Failed Loading job accurev_trigger hudson.util.IOException2: <path>/configuration/jobs/<job>/nextBuildNumber doesn't contain a number

  • environment: Linux/tomcat - Jenkins version 1.436

Activity

  1. jenkins-infra-bot commented on Nov 2, 2011

    @jenkins-infra-bot
    Author
    emanuelez:
    • Original comment link
    • Raw content of original comment:

      I'm taking a look at this. The problem here is wether we want to 1) fix the root cause (finding out why the nextBuildNumber file is empty) 2) fixing the symptom (inserting an appropriate number in the file) 3) setting up a notification system to tell the user what happened and how to fix it.

      Right now I'm taking a look at option 2) which is in theory the ugliest solution but also one that does not require user intervention

    I'm taking a look at this. The problem here is wether we want to
    1) fix the root cause (finding out why the nextBuildNumber file is empty)
    2) fixing the symptom (inserting an appropriate number in the file)
    3) setting up a notification system to tell the user what happened and how to fix it.

    Right now I'm taking a look at option 2) which is in theory the ugliest solution but also one that does not require user intervention

  2. jenkins-infra-bot commented on Nov 2, 2011

    @jenkins-infra-bot
    Author
    emanuelez:

    My fix is here: #303

  3. jenkins-infra-bot commented on Nov 2, 2011

    @jenkins-infra-bot
    Author
    scm_issue_link:

    Code changed in jenkins
    User: Emanuele Zattin
    Path:
    changelog.html
    core/src/main/java/hudson/model/Job.java
    http://jenkins-ci.org/commit/jenkins/8affa6d912f2f0777487990f2d7ef2813a19b04c
    Log:
    [FIXED JENKINS-11563]

    It would be better to find out why the nextBuildNumber is at times empty.
    In the mean time this will find the appropriate number and write it to the file.

    Compare: 3fb9bdb...8affa6d

  4. jenkins-infra-bot commented on Nov 2, 2011

    @jenkins-infra-bot
    Author
    kohsuke:
    • Original comment link
    • Raw content of original comment:

      Given that the write to the nextBuildNumber is protected in the atomic write, I'm not sure how it can be empty, but I'm merging pull #303 anyway as a defensive measure.

    Given that the write to the nextBuildNumber is protected in the atomic write, I'm not sure how it can be empty, but I'm merging pull #303 anyway as a defensive measure.

  5. jenkins-infra-bot commented on Nov 2, 2011

    @jenkins-infra-bot
    Author
    pickgr1:
    • Original comment link
    • Raw content of original comment:

      When we've seen this happen, it's usually due to some catastrophic event where the hard drive has crashed or the server that Jenkins was running on was not gracefully shutdown (power-outage). It's happened enough times though that I think this will be a very beneficial improvement for us. Thanks!

    When we've seen this happen, it's usually due to some catastrophic event where the hard drive has crashed or the server that Jenkins was running on was not gracefully shutdown (power-outage). It's happened enough times though that I think this will be a very beneficial improvement for us. Thanks!

  6. jenkins-infra-bot commented on Nov 2, 2011

    @jenkins-infra-bot
    Author
    dogfood:

    Integrated in jenkins_main_trunk #1262
    [FIXED JENKINS-11563]

    Kohsuke Kawaguchi : 8affa6d912f2f0777487990f2d7ef2813a19b04c
    Files :

    • core/src/main/java/hudson/model/Job.java
    • changelog.html
  7. added
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 24, 2025
  8. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original relates_to from Jira: JENKINS-27530]

  9. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions