• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Windows 10 pro version 1803,
      1.8.0_66-b18
      Jenkins 2.148

      Jenkins gives a notification that there is a new version (2.149).

      Click Upgrade Automatically. 

      Jenkins starts the download to jenkins.war twice, 

      and gives twice the blue ball and message 'installed' 

      There are at this time 3 files on disk: jenkins.war, jenkins.war.bak and jenkins.war.tmp

      Set 'restart' checkbox: only .war.bak remains after service is stopped.

      Jenkins fails to start because jenkins.war is not found.

       

      third attempt (while writing this report) succeeded.

      It only downloaded & installed once after setting 'udgrade automatically'.

      There are no other users on this serrver who will start an upgrade.

        1. DoubleClick.err
          2 kB
        2. Jenkins.err
          3 kB
        3. jenkins.xml
          2 kB

          [JENKINS-54318] Jenkins Upgrade Now deletes new .war at restart

          Oleg Nenashev added a comment -

          Hi. Are you running it as a Windows service. If yes, could you please provide the jenkins.xml configuration?

          Oleg Nenashev added a comment - Hi. Are you running it as a Windows service. If yes, could you please provide the jenkins.xml configuration?

          Yes,  Jenkins is run as a windows service. 

           

          we've not modified the xml from base install. 

          I've included the part of the error log which is relevant. 

          It looks like the upgrade is started twice, but I'm not aware of double-clicking on the link. 

          Rene Affourtit added a comment - Yes,  Jenkins is run as a windows service.    we've not modified the xml from base install.  I've included the part of the error log which is relevant.  It looks like the upgrade is started twice, but I'm not aware of double-clicking on the link. 

          Daniel Beck added a comment -

          Jenkins starts the download to jenkins.war twice,

          This looks similar to JENKINS-54570 which happened due to a JavaScript change since 2.148. Should be fixed from 2.152 on.

          Daniel Beck added a comment - Jenkins starts the download to jenkins.war twice, This looks similar to JENKINS-54570 which happened due to a JavaScript change since 2.148. Should be fixed from 2.152 on.

          Keith Davis added a comment - - edited

          Same issue. Windows service. Upgraded using UI from 2.151 to 2.152. File, jenkins.war, was deleted.

          INFO: Finished telemetry collection. 249 ms
          Nov 22, 2018 10:53:09 AM hudson.model.UpdateCenter doUpgrade
          INFO: Scheduling the core upgrade
          Nov 22, 2018 10:53:09 AM hudson.model.UpdateCenter doUpgrade
          INFO: Scheduling the core upgrade
          Nov 22, 2018 10:53:11 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Starting the installation of jenkins.war on behalf of keithdavis
          Nov 22, 2018 10:53:11 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download
          INFO: Downloading jenkins.war
          Nov 22, 2018 10:53:49 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Installation successful: jenkins.war
          Nov 22, 2018 10:53:49 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Starting the installation of jenkins.war on behalf of keithdavis
          Nov 22, 2018 10:53:50 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download
          INFO: Downloading jenkins.war
          Nov 22, 2018 10:54:30 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Installation successful: jenkins.war
          Nov 22, 2018 10:54:39 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Starting the installation of Branch API on behalf of keithdavis
          Nov 22, 2018 10:54:39 AM hudson.model.UpdateSite$Plugin deploy
          INFO: Adding dependent install of trilead-api for plugin ssh-slaves
          Nov 22, 2018 10:54:39 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download
          INFO: Downloading Branch API
          Nov 22, 2018 10:54:40 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Starting the installation of Folders on behalf of keithdavis
          Nov 22, 2018 10:54:40 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download
          INFO: Downloading Folders
          Nov 22, 2018 10:54:40 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Starting the installation of GitLab on behalf of keithdavis
          Nov 22, 2018 10:54:41 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download
          INFO: Downloading GitLab
          Nov 22, 2018 10:54:46 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Starting the installation of Git client on behalf of keithdavis
          Nov 22, 2018 10:54:47 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download
          INFO: Downloading Git client
          Nov 22, 2018 10:54:48 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Starting the installation of Trilead API on behalf of keithdavis
          Nov 22, 2018 10:54:48 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download
          INFO: Downloading Trilead API
          Nov 22, 2018 10:54:49 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Starting the installation of SSH Slaves on behalf of keithdavis
          Nov 22, 2018 10:54:49 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download
          INFO: Downloading SSH Slaves
          Nov 22, 2018 10:54:49 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Starting the installation of Display URL API on behalf of keithdavis
          Nov 22, 2018 10:54:50 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download
          INFO: Downloading Display URL API
          Nov 22, 2018 10:54:50 AM hudson.model.UpdateCenter$DownloadJob run
          INFO: Starting the installation of Pipeline: API on behalf of keithdavis
          Nov 22, 2018 10:54:50 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download
          INFO: Downloading Pipeline: API
          Nov 22, 2018 10:54:56 AM hudson.model.UpdateCenter doSafeRestart
          INFO: Scheduling Jenkins reboot
          Nov 22, 2018 10:54:57 AM jenkins.model.Jenkins$23 run
          INFO: Restart in 10 seconds
          Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins$23 run
          INFO: Restarting VM as requested by keithdavis
          Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins cleanUp
          INFO: Stopping Jenkins
          Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins$18 onAttained
          INFO: Started termination
          Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins$18 onAttained
          INFO: Completed termination
          Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins _cleanUpDisconnectComputers
          INFO: Starting node disconnection
          Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins _cleanUpShutdownPluginManager
          INFO: Stopping plugin manager
          Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins _cleanUpPersistQueue
          INFO: Persisting build queue
          Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins _cleanUpAwaitDisconnects
          INFO: Waiting for node disconnection completion
          Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins cleanUp
          INFO: Jenkins stopped
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war
          Error: Unable to access jarfile C:\Jenkins\jenkins.war

           

          Downloaded 2.152 WAR file into the Jenkins directory. Started service. Works.

          Keith Davis added a comment - - edited Same issue. Windows service. Upgraded using UI from 2.151 to 2.152. File, jenkins.war, was deleted. INFO: Finished telemetry collection. 249 ms Nov 22, 2018 10:53:09 AM hudson.model.UpdateCenter doUpgrade INFO: Scheduling the core upgrade Nov 22, 2018 10:53:09 AM hudson.model.UpdateCenter doUpgrade INFO: Scheduling the core upgrade Nov 22, 2018 10:53:11 AM hudson.model.UpdateCenter$DownloadJob run INFO: Starting the installation of jenkins.war on behalf of keithdavis Nov 22, 2018 10:53:11 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download INFO: Downloading jenkins.war Nov 22, 2018 10:53:49 AM hudson.model.UpdateCenter$DownloadJob run INFO: Installation successful: jenkins.war Nov 22, 2018 10:53:49 AM hudson.model.UpdateCenter$DownloadJob run INFO: Starting the installation of jenkins.war on behalf of keithdavis Nov 22, 2018 10:53:50 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download INFO: Downloading jenkins.war Nov 22, 2018 10:54:30 AM hudson.model.UpdateCenter$DownloadJob run INFO: Installation successful: jenkins.war Nov 22, 2018 10:54:39 AM hudson.model.UpdateCenter$DownloadJob run INFO: Starting the installation of Branch API on behalf of keithdavis Nov 22, 2018 10:54:39 AM hudson.model.UpdateSite$Plugin deploy INFO: Adding dependent install of trilead-api for plugin ssh-slaves Nov 22, 2018 10:54:39 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download INFO: Downloading Branch API Nov 22, 2018 10:54:40 AM hudson.model.UpdateCenter$DownloadJob run INFO: Starting the installation of Folders on behalf of keithdavis Nov 22, 2018 10:54:40 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download INFO: Downloading Folders Nov 22, 2018 10:54:40 AM hudson.model.UpdateCenter$DownloadJob run INFO: Starting the installation of GitLab on behalf of keithdavis Nov 22, 2018 10:54:41 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download INFO: Downloading GitLab Nov 22, 2018 10:54:46 AM hudson.model.UpdateCenter$DownloadJob run INFO: Starting the installation of Git client on behalf of keithdavis Nov 22, 2018 10:54:47 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download INFO: Downloading Git client Nov 22, 2018 10:54:48 AM hudson.model.UpdateCenter$DownloadJob run INFO: Starting the installation of Trilead API on behalf of keithdavis Nov 22, 2018 10:54:48 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download INFO: Downloading Trilead API Nov 22, 2018 10:54:49 AM hudson.model.UpdateCenter$DownloadJob run INFO: Starting the installation of SSH Slaves on behalf of keithdavis Nov 22, 2018 10:54:49 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download INFO: Downloading SSH Slaves Nov 22, 2018 10:54:49 AM hudson.model.UpdateCenter$DownloadJob run INFO: Starting the installation of Display URL API on behalf of keithdavis Nov 22, 2018 10:54:50 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download INFO: Downloading Display URL API Nov 22, 2018 10:54:50 AM hudson.model.UpdateCenter$DownloadJob run INFO: Starting the installation of Pipeline: API on behalf of keithdavis Nov 22, 2018 10:54:50 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download INFO: Downloading Pipeline: API Nov 22, 2018 10:54:56 AM hudson.model.UpdateCenter doSafeRestart INFO: Scheduling Jenkins reboot Nov 22, 2018 10:54:57 AM jenkins.model.Jenkins$23 run INFO: Restart in 10 seconds Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins$23 run INFO: Restarting VM as requested by keithdavis Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins cleanUp INFO: Stopping Jenkins Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins$18 onAttained INFO: Started termination Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins$18 onAttained INFO: Completed termination Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins _cleanUpDisconnectComputers INFO: Starting node disconnection Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins _cleanUpShutdownPluginManager INFO: Stopping plugin manager Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins _cleanUpPersistQueue INFO: Persisting build queue Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins _cleanUpAwaitDisconnects INFO: Waiting for node disconnection completion Nov 22, 2018 10:55:07 AM jenkins.model.Jenkins cleanUp INFO: Jenkins stopped Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war Error: Unable to access jarfile C:\Jenkins\jenkins.war   Downloaded 2.152 WAR file into the Jenkins directory. Started service. Works.

          Daniel Beck added a comment -

          We merged a change to 2.152 that I believe would address this problem. Once 2.153 is out, please upgrade using this method, and report back. My expectation is that the upgrade will only be triggered once in that case.

          But it would also be interesting to know what happens when you just click the button twice in quick succession – ideally we should prevent against this server side. Like Jira should not let me submit this comment twice, for example.

          Daniel Beck added a comment - We merged a change to 2.152 that I believe would address this problem. Once 2.153 is out, please upgrade using this method, and report back. My expectation is that the upgrade will only be triggered once in that case. But it would also be interesting to know what happens when you just click the button twice in quick succession – ideally we should prevent against this server side. Like Jira should not let me submit this comment twice, for example.

          Rene Affourtit added a comment - - edited

          When updating from 2.15*1* to 2.152 I intentionally doubleclicked. 
          The symptoms are the same, so Ill  try to reproduce to a higher version once that becomes available.

           

          [edit] would have sworn I saw 2.153, now it says 2.152. updated to match.

          Rene Affourtit added a comment - - edited When updating from 2.15*1* to 2.152 I intentionally doubleclicked.  The symptoms are the same, so Ill  try to reproduce to a higher version once that becomes available.   [edit] would have sworn I saw 2.153, now it says 2.152. updated to match.

          Daniel Beck added a comment -

          To clarify, first we'd like confirmation that we fix in 2.152 makes updating to 2.153 or enwer safe without double user input Then we can look at user accidentally doubleclicking and such.

          Daniel Beck added a comment - To clarify, first we'd like confirmation that we fix in 2.152 makes updating to 2.153 or enwer safe without double user input Then we can look at user accidentally doubleclicking and such.

          Keith Davis added a comment -

          Updated to 2.153 with no issues.

          Keith Davis added a comment - Updated to 2.153 with no issues.

          James added a comment -

          This is still happening for me.  I was on 2.150 and have tried to "Upgrade Automatically" once to 2.151 and twice to 2.153.  Each time I had to go into the Jenkins folder and manually copy Jenkins.war.bak to Jenkins.war to get the service back up and running.

          James added a comment - This is still happening for me.  I was on 2.150 and have tried to "Upgrade Automatically" once to 2.151 and twice to 2.153.  Each time I had to go into the Jenkins folder and manually copy Jenkins.war.bak to Jenkins.war to get the service back up and running.

          Daniel Beck added a comment -

          jamesivie To clarify, what version of Jenkins was running at the time you tried to upgrade? If it's older than 2.152, as per my previous comment, that's expected.

          Daniel Beck added a comment - jamesivie To clarify, what version of Jenkins was running at the time you tried to upgrade? If it's older than 2.152, as per my previous comment, that's expected.

          James added a comment - - edited

          I'm not sure that's clear at all, or what is happening or expected.  There was no double-clicking involved.  I clicked once to 'Upgrade Automatically' from 2.150 to 2.153.  Downloads appeared to finish.  I then clicked once to 'Restart', and Jenkins never came back up.  At this point, I have to manually restore the Jenkins.war file.  Are you saying that EVERYONE using 2.149-2.152 will have to go through a manual process to upgrade?

          James added a comment - - edited I'm not sure that's clear at all, or what is happening or expected.  There was no double-clicking involved.  I clicked once to 'Upgrade Automatically' from 2.150 to 2.153.  Downloads appeared to finish.  I then clicked once to 'Restart', and Jenkins never came back up.  At this point, I have to manually restore the Jenkins.war file.  Are you saying that EVERYONE using 2.149-2.152 will have to go through a manual process to upgrade?

          Daniel Beck added a comment -

          Are you saying that EVERYONE using 2.149-2.152 will have to go through a manual process to upgrade?

          If they use the built-in auto update, rather than a package manager, installer, or just replacing the docker image, I would expect so.

          Daniel Beck added a comment - Are you saying that EVERYONE using 2.149-2.152 will have to go through a manual process to upgrade? If they use the built-in auto update, rather than a package manager, installer, or just replacing the docker image, I would expect so.

          James added a comment -

          And what is the process to do a manual upgrade, exactly?  I'd rather not lose 50 build configs trying to update or be down for hours trying to figure out how to get back up.

          James added a comment - And what is the process to do a manual upgrade, exactly?  I'd rather not lose 50 build configs trying to update or be down for hours trying to figure out how to get back up.

          Daniel Beck added a comment -

          If jenkins.war.bak is the previously running version rather than the newly downloaded one, don't restore that, but instead download Jenkins from its website and place it where jenkins.war should be.

          Daniel Beck added a comment - If  jenkins.war.bak is the previously running version rather than the newly downloaded one, don't restore that, but instead download Jenkins from its website and place it where jenkins.war should be.

          James added a comment -

          Since I'm back up and running, I see there is a link to download the new WAR file, but I'm not sure people who are in the failed state will be able to find anything other than a full installation.  Any advice for them–they will probably eventually come here for help.  Also, is it OK to update just the WAR file by itself?  The Jenkins.exe (and who knows what else) won't match that version.

          James added a comment - Since I'm back up and running, I see there is a link to download the new WAR file, but I'm not sure people who are in the failed state will be able to find anything other than a full installation.  Any advice for them–they will probably eventually come here for help.  Also, is it OK to update just the WAR file by itself?  The Jenkins.exe (and who knows what else) won't match that version.

          Daniel Beck added a comment -

          If you've been using the Jenkins built-in update functionality, you've just replaced the war file all this time anyway.

          Daniel Beck added a comment - If you've been using the Jenkins built-in update functionality, you've just replaced the war file all this time anyway.

          James added a comment -

          For the rest of the planet whose Jenkins fails when they try to upgrade and their Jenkins.war file is missing, and who can't get to the link to the new WAR file to get back up and running because their Jenkins is down, here is the link to a new WAR file that will hopefully get you back up and running:

          http://updates.jenkins-ci.org/download/war/2.153/jenkins.war

          Put this file in your Jenkins folder (there should not be a file with the same name there already if you're in this state, but there should be a Jenkins.war.bak file that is the old version), and restart the service either through the UI, or using the CMD console and running "net start Jenkins".

          James added a comment - For the rest of the planet whose Jenkins fails when they try to upgrade and their Jenkins.war file is missing, and who can't get to the link to the new WAR file to get back up and running because their Jenkins is down, here is the link to a new WAR file that will hopefully get you back up and running: http://updates.jenkins-ci.org/download/war/2.153/jenkins.war Put this file in your Jenkins folder (there should  not be a file with the same name there already if you're in this state, but there should be a Jenkins.war.bak file that is the old version), and restart the service either through the UI, or using the CMD console and running "net start Jenkins".

          Last week I upgraded from 2.152 to 2.153 four times without trouble. 

           

          Because it has been an intermittent problem for me I reverted to 2.152 again and repeated the cycle a few times. 

          Also when trying to 'force' the issue with a doubleclick it worked fine. 

          Delayed feedback because I wanted to try the same on 2.154, but that's not out yet. 

           

          For me this issue can be marked as resolved.

          Rene Affourtit added a comment - Last week I upgraded from 2.152 to 2.153 four times without trouble.    Because it has been an intermittent problem for me I reverted to 2.152 again and repeated the cycle a few times.  Also when trying to 'force' the issue with a doubleclick it worked fine.  Delayed feedback because I wanted to try the same on 2.154, but that's not out yet.    For me this issue can be marked as resolved.

          Updated to 2.153 and 2.154.

          Both multiple times without any further issues.

          Rene Affourtit added a comment - Updated to 2.153 and 2.154. Both multiple times without any further issues.

            Unassigned Unassigned
            renea Rene Affourtit
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: