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

Backup process breaks due to FileNotFoundException

    XMLWordPrintable

Details

    • Bug
    • Status: In Progress (View Workflow)
    • Critical
    • Resolution: Unresolved
    • thinbackup-plugin
    • None
    • Jenkins LTS 2.303.2
      Thin Backup Plugin 1.10

    Description

      We see failing backups with the plugin with the following log message:

      2021-12-20 01:20:22.584+0000 [id=2126208]       SEVERE  o.j.h.p.t.ThinBackupPeriodicWork#backupNow: Cannot perform a backup. Please be sure jenkins/hudson 
      has write privileges in the configured backup path '/var/lib/jenkins/BACKUP'.
      java.io.FileNotFoundException: Source '/var/lib/jenkins/jobs/dirlevel1/jobs/dirlevel2/config.xml' does not exist
              at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1074)
              at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1038)
              at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupJobsDirectory(HudsonBackup.java:227)
              at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupJobsDirectory(HudsonBackup.java:228)
              at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupJobs(HudsonBackup.java:209)
              at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:168)
              at org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork.backupNow(ThinBackupPeriodicWork.java:89)
              at org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork.execute(ThinBackupPeriodicWork.java:66)
              at org.jvnet.hudson.plugins.thinbackup.hudson.model.AsyncPeriodicWork.lambda$doRun$0(AsyncPeriodicWork.java:53)
              at java.lang.Thread.run(Thread.java:748)
      

      (The path to the missing file has been anonymized)

      The plugin expects the config.xml in a location where it doesn't exist. This is due to assumptions which are done in the plugin code and it seems those assumptions do not fit.

      The error also shows that some other plugins do not clean up properly as in the current case we had left over folders from a former pipeline (or multibranch pipeline) job. Those folders should have been deleted by the Jenkins logic once the user triggers the deletion or move, but seems to be buggy.

      Anyway, the plugin should be careful with trying to copy things which probably do not exist.

      I am gonna prepare a PR to alleviate this problem.

      Attachments

        Issue Links

          Activity

            krulls Stephan Krull created issue -
            krulls Stephan Krull made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-12098 [ JENKINS-12098 ]
            krulls Stephan Krull made changes -
            Link This issue is related to JENKINS-65516 [ JENKINS-65516 ]
            krulls Stephan Krull made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            krulls Stephan Krull made changes -
            Assignee Thomas Fürer [ tofuatjava ] Stephan Krull [ krulls ]
            krulls Stephan Krull made changes -
            Remote Link This issue links to "https://github.com/jenkinsci/thin-backup-plugin/pull/33 (Web Link)" [ 27322 ]

            People

              krulls Stephan Krull
              krulls Stephan Krull
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: