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

Failed to update permalink: unable to delete

XMLWordPrintable

      Sometimes users report seeing exceptions such as

      ... jenkins.model.PeepholePermalink updateCache
      WARNING: Failed to update ... lastSuccessfulBuild permalink for ...
      java.io.IOException: Unable to delete /jenkins/jobs/.../builds/lastSuccessfulBuild
      	at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:112)
      	at jenkins.model.PeepholePermalink.writeSymlink(PeepholePermalink.java:200)
      	at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:150)
      	at jenkins.model.PeepholePermalink.resolve(PeepholePermalink.java:122)
      	at hudson.model.Job.getLastSuccessfulBuild(Job.java:857)
      

      In one case this was discovered to be due to lastSuccessfulBuild being an actual directory rather than a symlink, due to an incorrect restoration from backup. But AtomicFileWriter should use Util.deleteFile or similar to make sure that Java 7 methods are first used to perform the deletion, which provide better diagnostics.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: