Update stuck at step 9 (16.0.4.)

Nextcloud version (eg, 12.0.2): 16.0.4.
Operating system and version (eg, Ubuntu 17.04): unkown / shared hosting
Apache or nginx version (eg, Apache 2.4.25): unkown / shared hosting
PHP version (eg, 7.1): 7.2

The issue you are facing: Update to 16.0.4 is stuck at step 9. Nextcloud web and admin is not available (error: Update in process.)

Is this the first time you’ve seen this error? (Y/N): Y

The output of your Nextcloud log in Admin > Logging:

2019-11-10T14:12:19+0100 ZbZQAfDqeD [info] getChangelogURL()
2019-11-10T14:12:19+0100 ZbZQAfDqeD [info] end of checkForUpdate() Update to Nextcloud 16.0.6 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-16.0.6.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#16-0-6" target="_blank" rel="noreferrer noopener">Open changelog ↗</a>
2019-11-10T14:12:20+0100 KBur6hp0c7 [info] request to updater
2019-11-10T14:12:20+0100 KBur6hp0c7 [info] currentStep()
2019-11-10T14:12:20+0100 KBur6hp0c7 [info] POST request for step "1"
2019-11-10T14:12:20+0100 KBur6hp0c7 [info] startStep("1")
2019-11-10T14:12:20+0100 KBur6hp0c7 [info] checkForExpectedFilesAndFolders()
2019-11-10T14:12:20+0100 KBur6hp0c7 [info] end of checkForExpectedFilesAndFolders()
2019-11-10T14:12:20+0100 KBur6hp0c7 [info] endStep("1")
2019-11-10T14:12:20+0100 7PR2pPBTro [info] request to updater
2019-11-10T14:12:20+0100 7PR2pPBTro [info] currentStep()
2019-11-10T14:12:20+0100 7PR2pPBTro [info] Step 1 is in state "end".
2019-11-10T14:12:20+0100 7PR2pPBTro [info] POST request for step "2"
2019-11-10T14:12:20+0100 7PR2pPBTro [info] startStep("2")
2019-11-10T14:12:20+0100 7PR2pPBTro [info] checkWritePermissions()
2019-11-10T14:12:20+0100 7PR2pPBTro [info] end of checkWritePermissions()
2019-11-10T14:12:20+0100 7PR2pPBTro [info] endStep("2")
2019-11-10T14:12:21+0100 rtZrXnCHhS [info] request to updater
2019-11-10T14:12:21+0100 rtZrXnCHhS [info] currentStep()
2019-11-10T14:12:21+0100 rtZrXnCHhS [info] Step 2 is in state "end".
2019-11-10T14:12:21+0100 rtZrXnCHhS [info] POST request for step "3"
2019-11-10T14:12:21+0100 rtZrXnCHhS [info] startStep("3")
2019-11-10T14:12:21+0100 rtZrXnCHhS [info] createBackup()
2019-11-10T14:13:29+0100 rtZrXnCHhS [info] end of createBackup()
2019-11-10T14:13:29+0100 rtZrXnCHhS [info] endStep("3")
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] request to updater
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] currentStep()
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] Step 3 is in state "end".
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] POST request for step "4"
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] startStep("4")
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] downloadUpdate()
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] getUpdateServerResponse()
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] updaterServer: https://updates.nextcloud.com/updater_server/
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] releaseChannel: stable
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] internal version: 16.0.4.1
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] updateURL: https://updates.nextcloud.com/updater_server/?version=16x0x4x1xxxstablexx2019-08-14T18%3A57%3A27%2B00%3A00+a1a245e88202d834f08f4c2e4451dcbe9baee3aax7x2x19
2019-11-10T14:13:29+0100 hf0YEmwIuB [info] getUpdateServerResponse response: Array
(
    [version] => 16.0.6.1
    [versionstring] => Nextcloud 16.0.6
    [url] => https://download.nextcloud.com/server/releases/nextcloud-16.0.6.zip
    [web] => https://docs.nextcloud.com/server/16/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=16.0.6
    [autoupdater] => 1
    [eol] => 0
    [signature] => fdy5tfNIlHvO6d/GMIQ9WIYWD9j0KTKz2LZYCPNl2ulQs3OT6oDPk83uaq9I/mHA
eGCB3v0CMBeEYB6n0UZS95AnQSW5teFBroPcWDgdfkromMUSjD4TwJXedU94VfOx
RFamq6Nd65dqwfQ+PMDMW6E3ySpMLPT3NIOpiVOBnLqOO9AINyCn4lOacNDFINqq
BkPE2oK+QzwXjLV09mpffk7BaZwpNWkGiH6uQp/TcSog2RsNyIdQhhrE2XhkInn5
CKR41re0nUXQUyZBKTaQmOHezIeMHn9Z22Utt7npcVCNpqqb8RxIs8x/TJn9d+TZ
w/2xv2Pr0RV364JfdPO7ow==
)

2019-11-10T14:13:29+0100 hf0YEmwIuB [info] storage location exists
2019-11-10T14:13:36+0100 hf0YEmwIuB [info] end of downloadUpdate()
2019-11-10T14:13:38+0100 hf0YEmwIuB [info] endStep("4")
2019-11-10T14:13:38+0100 8wD6PBZtqO [info] request to updater
2019-11-10T14:13:38+0100 8wD6PBZtqO [info] currentStep()
2019-11-10T14:13:38+0100 8wD6PBZtqO [info] Step 4 is in state "end".
2019-11-10T14:13:38+0100 8wD6PBZtqO [info] POST request for step "5"
2019-11-10T14:13:39+0100 8wD6PBZtqO [info] startStep("5")
2019-11-10T14:13:39+0100 8wD6PBZtqO [info] verifyIntegrity()
2019-11-10T14:13:39+0100 8wD6PBZtqO [info] getUpdateServerResponse()
2019-11-10T14:13:39+0100 8wD6PBZtqO [info] updaterServer: https://updates.nextcloud.com/updater_server/
2019-11-10T14:13:39+0100 8wD6PBZtqO [info] releaseChannel: stable
2019-11-10T14:13:39+0100 8wD6PBZtqO [info] internal version: 16.0.4.1
2019-11-10T14:13:39+0100 8wD6PBZtqO [info] updateURL: https://updates.nextcloud.com/updater_server/?version=16x0x4x1xxxstablexx2019-08-14T18%3A57%3A27%2B00%3A00+a1a245e88202d834f08f4c2e4451dcbe9baee3aax7x2x19
2019-11-10T14:13:39+0100 8wD6PBZtqO [info] getUpdateServerResponse response: Array
(
    [version] => 16.0.6.1
    [versionstring] => Nextcloud 16.0.6
    [url] => https://download.nextcloud.com/server/releases/nextcloud-16.0.6.zip
    [web] => https://docs.nextcloud.com/server/16/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=16.0.6
    [autoupdater] => 1
    [eol] => 0
    [signature] => fdy5tfNIlHvO6d/GMIQ9WIYWD9j0KTKz2LZYCPNl2ulQs3OT6oDPk83uaq9I/mHA
eGCB3v0CMBeEYB6n0UZS95AnQSW5teFBroPcWDgdfkromMUSjD4TwJXedU94VfOx
RFamq6Nd65dqwfQ+PMDMW6E3ySpMLPT3NIOpiVOBnLqOO9AINyCn4lOacNDFINqq
BkPE2oK+QzwXjLV09mpffk7BaZwpNWkGiH6uQp/TcSog2RsNyIdQhhrE2XhkInn5
CKR41re0nUXQUyZBKTaQmOHezIeMHn9Z22Utt7npcVCNpqqb8RxIs8x/TJn9d+TZ
w/2xv2Pr0RV364JfdPO7ow==
)

2019-11-10T14:13:39+0100 8wD6PBZtqO [info] storage location: /home/sites/site19/web/1lv.eu/nc/data/updater-ochni3xyxvuu/downloads/
2019-11-10T14:13:40+0100 8wD6PBZtqO [info] end of verifyIntegrity()
2019-11-10T14:13:40+0100 8wD6PBZtqO [info] endStep("5")
2019-11-10T14:13:40+0100 A07QIbqPTb [info] request to updater
2019-11-10T14:13:40+0100 A07QIbqPTb [info] currentStep()
2019-11-10T14:13:40+0100 A07QIbqPTb [info] Step 5 is in state "end".
2019-11-10T14:13:40+0100 A07QIbqPTb [info] POST request for step "6"
2019-11-10T14:13:40+0100 A07QIbqPTb [info] startStep("6")
2019-11-10T14:13:40+0100 A07QIbqPTb [info] extractDownload()
2019-11-10T14:13:40+0100 A07QIbqPTb [info] storage location: /home/sites/site19/web/1lv.eu/nc/data/updater-ochni3xyxvuu/downloads/
2019-11-10T14:13:47+0100 A07QIbqPTb [info] end of extractDownload()
2019-11-10T14:13:47+0100 A07QIbqPTb [info] endStep("6")
2019-11-10T14:13:47+0100 AMIctbeONL [info] request to updater
2019-11-10T14:13:47+0100 AMIctbeONL [info] currentStep()
2019-11-10T14:13:47+0100 AMIctbeONL [info] Step 6 is in state "end".
2019-11-10T14:13:47+0100 AMIctbeONL [info] POST request for step "7"
2019-11-10T14:13:47+0100 AMIctbeONL [info] startStep("7")
2019-11-10T14:13:47+0100 AMIctbeONL [info] setMaintenanceMode("true")
2019-11-10T14:13:47+0100 AMIctbeONL [info] configFileName /home/sites/site100011872/web/1lv.eu/nc/updater/../config/config.php
2019-11-10T14:13:47+0100 AMIctbeONL [info] end of setMaintenanceMode()
2019-11-10T14:13:47+0100 AMIctbeONL [info] endStep("7")
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] request to updater
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] currentStep()
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] Step 7 is in state "end".
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] POST request for step "8"
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] startStep("8")
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] replaceEntryPoints()
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] replace index.php
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] replace status.php
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] replace remote.php
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] replace public.php
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] replace ocs/v1.php
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] replace ocs/v2.php
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] end of replaceEntryPoints()
2019-11-10T14:13:47+0100 4V7PzVrQfo [info] endStep("8")
2019-11-10T14:13:47+0100 rRrGg07HpZ [info] request to updater
2019-11-10T14:13:47+0100 rRrGg07HpZ [info] currentStep()
2019-11-10T14:13:47+0100 rRrGg07HpZ [info] Step 8 is in state "end".
2019-11-10T14:13:47+0100 rRrGg07HpZ [info] POST request for step "9"
2019-11-10T14:13:47+0100 rRrGg07HpZ [info] startStep("9")
2019-11-10T14:13:47+0100 rRrGg07HpZ [info] deleteOldFiles()
2019-11-10T14:13:51+0100 rRrGg07HpZ [info] config sample exists
2019-11-10T14:13:51+0100 rRrGg07HpZ [info] themes README exists
2019-11-10T14:14:35+0100 rRrGg07HpZ [info] end of deleteOldFiles()
2019-11-10T14:14:35+0100 rRrGg07HpZ [info] endStep("9")
2019-11-10T16:41:24+0100 tuephYTFxU [info] request to updater
2019-11-10T16:41:24+0100 tuephYTFxU [info] currentStep()
2019-11-10T16:41:24+0100 tuephYTFxU [info] Step 9 is in state "end".
2019-11-10T16:41:24+0100 tuephYTFxU [info] POST request for step "9"
2019-11-10T16:41:24+0100 tuephYTFxU [info] startStep("9")
2019-11-10T16:41:24+0100 tuephYTFxU [info] deleteOldFiles()
2019-11-10T16:41:24+0100 tuephYTFxU [error] POST request failed with other exception
2019-11-10T16:41:24+0100 tuephYTFxU [error] Exception: Exception
Message: core/shipped.json is not available
Code:0
Trace:
#0 /home/sites/site100011872/web/1lv.eu/nc/updater/index.php(1354): Updater->deleteOldFiles()
#1 {main}
File:/home/sites/site100011872/web/1lv.eu/nc/updater/index.php
Line:908

2019-11-10T16:41:24+0100 tuephYTFxU [info] rollbackChanges("9")
2019-11-10T16:41:24+0100 tuephYTFxU [info] unlink .step
2019-11-10T16:41:24+0100 tuephYTFxU [info] rollbackChanges - step >= 7
2019-11-10T16:41:24+0100 tuephYTFxU [info] end of  rollbackChanges()
2019-12-22T18:56:30+0100 NhX7rJZuBv [info] request to updater
2019-12-22T18:56:30+0100 NhX7rJZuBv [info] currentStep()
2019-12-22T18:56:30+0100 NhX7rJZuBv [info] show HTML page
2019-12-22T18:56:30+0100 NhX7rJZuBv [info] current version: 16.0.4 build time: 
2019-12-22T18:57:40+0100 lQuyKw3HC5 [info] request to updater
2019-12-22T18:57:40+0100 lQuyKw3HC5 [info] currentStep()
2019-12-22T18:57:40+0100 lQuyKw3HC5 [info] show HTML page
2019-12-22T18:57:40+0100 lQuyKw3HC5 [info] current version: 16.0.4 build time: 
2019-12-22T18:58:09+0100 HPXb18VD1K [info] request to updater
2019-12-22T18:58:09+0100 HPXb18VD1K [info] currentStep()
2019-12-22T18:58:09+0100 HPXb18VD1K [info] show HTML page
2019-12-22T18:58:09+0100 HPXb18VD1K [info] current version: 16.0.4 build time: 
2019-12-22T18:58:27+0100 3TCO7vaKj6 [info] request to updater
2019-12-22T18:58:27+0100 3TCO7vaKj6 [info] currentStep()
2019-12-22T18:58:27+0100 3TCO7vaKj6 [info] show HTML page
2019-12-22T18:58:27+0100 3TCO7vaKj6 [info] current version: 16.0.4 build time: 
2019-12-22T18:58:32+0100 Hp1nIgSUsW [info] request to updater
2019-12-22T18:58:32+0100 Hp1nIgSUsW [info] currentStep()
2019-12-22T18:58:32+0100 Hp1nIgSUsW [info] show HTML page
2019-12-22T18:58:32+0100 Hp1nIgSUsW [info] current version: 16.0.4 build time: 
2019-12-22T18:58:42+0100 pfC0VyBdTZ [info] request to updater
2019-12-22T18:58:42+0100 pfC0VyBdTZ [info] currentStep()
2019-12-22T18:58:42+0100 pfC0VyBdTZ [info] show HTML page
2019-12-22T18:58:42+0100 pfC0VyBdTZ [info] current version: 16.0.4 build time: 
2020-01-12T17:30:31+0100 9LwhEakjNp [info] request to updater
2020-01-12T17:30:31+0100 9LwhEakjNp [info] currentStep()
2020-01-12T17:30:31+0100 9LwhEakjNp [info] show HTML page
2020-01-12T17:30:31+0100 9LwhEakjNp [info] current version: 16.0.4 build time: 
2020-01-12T17:31:51+0100 7UvaHESpaQ [info] request to updater
2020-01-12T17:31:51+0100 7UvaHESpaQ [info] currentStep()
2020-01-12T17:31:51+0100 7UvaHESpaQ [info] show HTML page
2020-01-12T17:31:51+0100 7UvaHESpaQ [info] current version: 16.0.4 build time: 
2020-01-12T17:32:17+0100 6lBsdATyT1 [info] request to updater
2020-01-12T17:32:17+0100 6lBsdATyT1 [info] currentStep()
2020-01-12T17:32:17+0100 6lBsdATyT1 [info] show HTML page
2020-01-12T17:32:17+0100 6lBsdATyT1 [info] current version: 16.0.4 build time: 
2020-01-12T17:32:35+0100 EvaTCYEGOI [info] request to updater
2020-01-12T17:32:35+0100 EvaTCYEGOI [info] currentStep()
2020-01-12T17:32:35+0100 EvaTCYEGOI [info] show HTML page
2020-01-12T17:32:35+0100 EvaTCYEGOI [info] current version: 16.0.4 build time: 

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ochni3xyxxx',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => '1lv.eu',
  ),
  'datadirectory' => '/home/sites/site19/web/1lv.eu/nc/data',
  'dbtype' => 'mysql',
  'version' => '16.0.4.1',
  'overwrite.cli.url' => 'https://1lv.eu/nc',
  'dbname' => 'dbxxxxx',
  'dbhost' => 'mysqlxx.manitu.net',
  'dbport' => '',
  'dbtableprefix' => '',
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'maintenance' => true,
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => '',
);

No idea what step 9 should be.

I would disable every app by the occ command and try to upgrade again. That issue is discussed already here in the forum in a few threads.

 2019-11-10T14:13:47+0100 rRrGg07HpZ [info] POST request for step "9"
2019-11-10T14:13:47+0100 rRrGg07HpZ [info] startStep("9")
2019-11-10T14:13:47+0100 rRrGg07HpZ [info] deleteOldFiles()
2019-11-10T14:13:51+0100 rRrGg07HpZ [info] config sample exists
2019-11-10T14:13:51+0100 rRrGg07HpZ [info] themes README exists
2019-11-10T14:14:35+0100 rRrGg07HpZ [info] end of deleteOldFiles()
2019-11-10T14:14:35+0100 rRrGg07HpZ [info] endStep("9")
2019-11-10T16:41:24+0100 tuephYTFxU [info] request to updater
2019-11-10T16:41:24+0100 tuephYTFxU [info] currentStep()
2019-11-10T16:41:24+0100 tuephYTFxU [info] Step 9 is in state "end".
2019-11-10T16:41:24+0100 tuephYTFxU [info] POST request for step "9"
2019-11-10T16:41:24+0100 tuephYTFxU [info] startStep("9")
2019-11-10T16:41:24+0100 tuephYTFxU [info] deleteOldFiles()
2019-11-10T16:41:24+0100 tuephYTFxU [error] POST request failed with other exception
2019-11-10T16:41:24+0100 tuephYTFxU [error] Exception: Exception
Message: core/shipped.json is not available
Code:0

Well it stops, because the File core/shipped.json is not available.
Maybe the easiest thing would be to download a version 16.0.4.1 archive, unzip it somewhere and copy this shipped.json file to the place where ist should belong.

Great, thanks for help!
Just checked, a lot of folders from the download package are missing, adding them now via FTP since I have no root/ssh on the shared server.
Any way to trigger the updater again without ssh?

maybe
occ maintenance:repair
would be an option

How can I get those running in an docker Image enviroment?

All I get is Could not open input file: occ

php /var/www/nextcloud/occ

For me this was a solution Update to 13 fails - core/shipped.json is not available

sadly there is nothing

root@nextcloud:/var/www# ls
localhost
root@nextcloud:/var/www# cd localhost/
root@nextcloud:/var/www/localhost# ls
htdocs
root@nextcloud:/var/www/localhost# cd htdocs/
root@nextcloud:/var/www/localhost/htdocs# ls
root@nextcloud:/var/www/localhost/htdocs#

updatedb && locate occ

and then

php /path/to/occ

https://docs.nextcloud.com/server/19/admin_manual/configuration_server/occ_command.html

also didn’t work out but thanks for your reply. I had to completely install the image from scrap and move everything :frowning:

For docker you need to do as described here https://github.com/nextcloud/docker#using-the-nextcloud-command-line-interface