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

Jenkins needs to check whether the war's directory is writeable before offering to upgrade

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Lifecycle#canRewriteHudsonWar assumes in-place replacement of the war, while UpdateCenter#download actually writes to a temporary file first to prevent breaking the file if an error occurs. This can lead to the following exception:

      hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/war/1.570/jenkins.war (redirected to: http://jenkins.mirror.isppower.de/war/1.570/jenkins.war)
      	at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:791)
      	at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1138)
      	at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1116)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
      	at java.lang.Thread.run(Thread.java:744)
      Caused by: java.io.FileNotFoundException: /usr/lib/jenkins/jenkins.war.tmp (Permission denied)
      	at java.io.FileOutputStream.open(Native Method)
      	at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
      	at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
      	at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:762)
      	... 6 more

        Attachments

          Issue Links

            Activity

            danielbeck Daniel Beck created issue -
            danielbeck Daniel Beck made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            danielbeck Daniel Beck made changes -
            Remote Link This issue links to "PR 1311 (Web Link)" [ 11105 ]
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            danielbeck Daniel Beck made changes -
            Labels lts-candidate
            olivergondza Oliver Gond┼ża made changes -
            Labels lts-candidate 1.565.2-fixed
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 156468 ] JNJira + In-Review [ 195426 ]

              People

              Assignee:
              danielbeck Daniel Beck
              Reporter:
              danielbeck Daniel Beck
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: