Broken Install After Using Web Updater, Not Sure Best Route to Recover

Nextcloud version (eg, 29.0.5): 28.0.7
Operating system and version (eg, Ubuntu 29.04): Arch Linux
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.59 (Unix)
PHP version (eg, 8.3): 8.1.27 (I think, I’m in a weird spot where I have two versions of PHP installed, and with Nextcloud currently broken I’m a little stuck how to figure out which one is being used. The other version is 8.2.9.)

The issue you are facing:
I keep getting Error 500 Gateway Timed Out messages when updating using the web GUI. It finally gave up the ghost on the Deleting Files step of the update, and now I can’t get it to finish, even using the command line updater. The occ file is missing.

I’m wondering if I need to do a manual update, but I’m a little hesitant, since I think it’s not unlikely that I’d mess something up in doing that. I see there is a folder under nextcloud/data/updater-<UUID-like string>/backups

I am happy to provide logs, etc, as needed. I not sure what would be useful, and didn’t want to try to go through and redact all my logs if they aren’t going to be helpful. Reply and let me know if there is a resource missing that you’d like to see, and I’ll happily provide it.

What do you mean it gave up? What did it do precisely?

and now I can’t get it to finish, even using the command line updater.

What happens in command line mode?

Please post your updater.log.

Just to confirm a couple items for context:

  • What was your original installation method?
  • Has this installation been updated successfully before?
1 Like

During the Deleting Files step, it threw some sort of an error, which I didn’t expand out in the web interface to see the details of. I had been having issues with PHP timeouts, and I assume that that was the issue, but it usually recovers nicely from those errors.

Updating at the terminal goes like this:

Nextcloud Updater - version: v28.0.5-1-g9595edb dirty

Current version is 28.0.7.

Update to Nextcloud 28.0.8 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-28.0.8.zip
Open changelog ↗

Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done

Start update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[ ] Extracting ...PHP Warning:  require(/srv/nextcloud/updater/../version.php): Failed to open stream: No such file or directory in phar:///srv/nextcloud/updater/updater.phar/lib/Updater.php on line 694
PHP Fatal error:  Uncaught Error: Failed opening required '/srv/nextcloud/updater/../version.php' (include_path='.:') in phar:///srv/nextcloud/updater/updater.phar/lib/Updater.php:694
Stack trace:
#0 phar:///srv/nextcloud/updater/updater.phar/lib/Updater.php(732): NC\Updater\Updater->getVersionByVersionFile()
#1 phar:///srv/nextcloud/updater/updater.phar/lib/UpdateCommand.php(384): NC\Updater\Updater->extractDownload()
#2 phar:///srv/nextcloud/updater/updater.phar/lib/UpdateCommand.php(237): NC\Updater\UpdateCommand->executeStep()
#3 phar:///srv/nextcloud/updater/updater.phar/vendor/symfony/console/Command/Command.php(255): NC\Updater\UpdateCommand->execute()
#4 phar:///srv/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(1021): Symfony\Component\Console\Command\Command->run()
#5 phar:///srv/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand()
#6 phar:///srv/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#7 phar:///srv/nextcloud/updater/updater.phar/updater.php(10): Symfony\Component\Console\Application->run()
#8 /srv/nextcloud/updater/updater.phar(14): require('...')
#9 {main}
  thrown in phar:///srv/nextcloud/updater/updater.phar/lib/Updater.php on line 694

Here’s updater.log:

rDkaObRNXjHFz0Vg7emRuQ==
)

2024-07-21T01:39:44+0000 SwvaNfhFRo [info] checkForUpdate() Array
(
    [version] => 28.0.8.1
    [versionstring] => Nextcloud 28.0.8
    [url] => https://download.nextcloud.com/server/releases/nextcloud-28.0.8.zip
    [web] => https://docs.nextcloud.com/server/28/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=28.0.8
    [autoupdater] => 1
    [eol] => 0
    [signature] => Y5TskcAoWIcMjc/8fYxS3h4CnT50iTXFBQGiPFGYWlRfBSUPp40Jqu7tx95hPdnE
6NfPAiVkfKvPTnCUJxdc01EtMQu3uUW664/MpfHsdrgsfb6eEZu+bTN2h5OplWuc
sP3QrFeGGTQRNW0eV5xKz/reLyGjZmzTGl8eQG7i82rSyk3ARbTgf9e2LleKV1mZ
iTDsMA+l/7K+yaAc7LEOtiHL7m9aoTbDMLGinU2k1HkFhQPJsZzA+n1cWzvn0VzU
cNFXl7yhrzKlqWe/26O3caT/2ytEK40yz5aclMBRrxqOBdUZ3O9SdHtjcOEyE9O6
rDkaObRNXjHFz0Vg7emRuQ==
)

2024-07-21T01:39:44+0000 SwvaNfhFRo [info] getChangelogURL()
2024-07-21T01:39:44+0000 SwvaNfhFRo [info] end of checkForUpdate() Update to Nextcloud 28.0.8 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-28.0.8.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#28-0-8" target="_blank" rel="noreferrer noopener">Open changelog ↗</a>
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] updater started
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] executeStep request for step "1"
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] startStep("1")
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] checkForExpectedFilesAndFolders()
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] end of checkForExpectedFilesAndFolders()
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] endStep("1")
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] executeStep request for step "2"
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] startStep("2")
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] checkWritePermissions()
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] end of checkWritePermissions()
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] endStep("2")
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] executeStep request for step "3"
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] startStep("3")
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] createBackup()
2024-07-21T01:39:50+0000 SwvaNfhFRo [info] backup folder location: /srv/nextcloud/data/updater-ocfa1bi0maxn/backups/nextcloud-28.0.7.4-1721525990/
2024-07-21T01:44:34+0000 SwvaNfhFRo [info] end of createBackup()
2024-07-21T01:44:34+0000 SwvaNfhFRo [info] endStep("3")
2024-07-21T01:44:34+0000 SwvaNfhFRo [info] executeStep request for step "4"
2024-07-21T01:44:34+0000 SwvaNfhFRo [info] startStep("4")
2024-07-21T01:44:34+0000 SwvaNfhFRo [info] downloadUpdate()
2024-07-21T01:44:34+0000 SwvaNfhFRo [info] getUpdateServerResponse()
2024-07-21T01:44:34+0000 SwvaNfhFRo [info] updaterServer: https://updates.nextcloud.com/updater_server/
2024-07-21T01:44:34+0000 SwvaNfhFRo [info] releaseChannel: stable
2024-07-21T01:44:34+0000 SwvaNfhFRo [info] internal version: 28.0.7.4
2024-07-21T01:44:34+0000 SwvaNfhFRo [info] updateURL: https://updates.nextcloud.com/updater_server/?version=28x0x7x4xxxstablexxx8x1x27
2024-07-21T01:44:34+0000 SwvaNfhFRo [info] getUpdateServerResponse response: Array
(
    [version] => 28.0.8.1
    [versionstring] => Nextcloud 28.0.8
    [url] => https://download.nextcloud.com/server/releases/nextcloud-28.0.8.zip
    [web] => https://docs.nextcloud.com/server/28/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=28.0.8
    [autoupdater] => 1
    [eol] => 0
    [signature] => Y5TskcAoWIcMjc/8fYxS3h4CnT50iTXFBQGiPFGYWlRfBSUPp40Jqu7tx95hPdnE
6NfPAiVkfKvPTnCUJxdc01EtMQu3uUW664/MpfHsdrgsfb6eEZu+bTN2h5OplWuc
sP3QrFeGGTQRNW0eV5xKz/reLyGjZmzTGl8eQG7i82rSyk3ARbTgf9e2LleKV1mZ
iTDsMA+l/7K+yaAc7LEOtiHL7m9aoTbDMLGinU2k1HkFhQPJsZzA+n1cWzvn0VzU
cNFXl7yhrzKlqWe/26O3caT/2ytEK40yz5aclMBRrxqOBdUZ3O9SdHtjcOEyE9O6
rDkaObRNXjHFz0Vg7emRuQ==
)

2024-07-21T01:44:34+0000 SwvaNfhFRo [info] storage location exists
2024-07-21T01:45:11+0000 SwvaNfhFRo [info] end of downloadUpdate()
2024-07-21T01:45:11+0000 SwvaNfhFRo [info] endStep("4")
2024-07-21T01:45:11+0000 SwvaNfhFRo [info] executeStep request for step "5"
2024-07-21T01:45:11+0000 SwvaNfhFRo [info] startStep("5")
2024-07-21T01:45:11+0000 SwvaNfhFRo [info] verifyIntegrity()
2024-07-21T01:45:11+0000 SwvaNfhFRo [info] getUpdateServerResponse()
2024-07-21T01:45:11+0000 SwvaNfhFRo [info] updaterServer: https://updates.nextcloud.com/updater_server/
2024-07-21T01:45:11+0000 SwvaNfhFRo [info] releaseChannel: stable
2024-07-21T01:45:11+0000 SwvaNfhFRo [info] internal version: 28.0.7.4
2024-07-21T01:45:11+0000 SwvaNfhFRo [info] updateURL: https://updates.nextcloud.com/updater_server/?version=28x0x7x4xxxstablexxx8x1x27
2024-07-21T01:45:12+0000 SwvaNfhFRo [info] getUpdateServerResponse response: Array
(
    [version] => 28.0.8.1
    [versionstring] => Nextcloud 28.0.8
    [url] => https://download.nextcloud.com/server/releases/nextcloud-28.0.8.zip
    [web] => https://docs.nextcloud.com/server/28/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=28.0.8
    [autoupdater] => 1
    [eol] => 0
    [signature] => Y5TskcAoWIcMjc/8fYxS3h4CnT50iTXFBQGiPFGYWlRfBSUPp40Jqu7tx95hPdnE
6NfPAiVkfKvPTnCUJxdc01EtMQu3uUW664/MpfHsdrgsfb6eEZu+bTN2h5OplWuc
sP3QrFeGGTQRNW0eV5xKz/reLyGjZmzTGl8eQG7i82rSyk3ARbTgf9e2LleKV1mZ
iTDsMA+l/7K+yaAc7LEOtiHL7m9aoTbDMLGinU2k1HkFhQPJsZzA+n1cWzvn0VzU
cNFXl7yhrzKlqWe/26O3caT/2ytEK40yz5aclMBRrxqOBdUZ3O9SdHtjcOEyE9O6
rDkaObRNXjHFz0Vg7emRuQ==
)

2024-07-21T01:45:12+0000 SwvaNfhFRo [info] storage location: /srv/nextcloud/data/updater-ocfa1bi0maxn/downloads/
2024-07-21T01:45:13+0000 SwvaNfhFRo [info] end of verifyIntegrity()
2024-07-21T01:45:13+0000 SwvaNfhFRo [info] endStep("5")
2024-07-21T01:45:13+0000 SwvaNfhFRo [info] executeStep request for step "6"
2024-07-21T01:45:13+0000 SwvaNfhFRo [info] startStep("6")
2024-07-21T01:45:13+0000 SwvaNfhFRo [info] extractDownload()
2024-07-21T01:45:13+0000 SwvaNfhFRo [info] storage location: /srv/nextcloud/data/updater-ocfa1bi0maxn/downloads/

My original installation method is a little lost to time… if I recall correctly, this was an OwnCloud instance back in the early 2010s, was migrated to Nextcloud, and then moved from a Debian server over to my current Arch system maybe a year or so ago. I have successfully done updates before – a big string of them when I moved to Arch, and then maybe one or two since then. I usually use the web updater, but during the server transfer I learned how to use the command line updater.

Do you have the updater.log contents from the original failure? The log entries you posted appear to only be from today’s run.

Since the original failure was somewhere in the deleteOldFiles() step, you’re old application code is already at least partially removed. So your version.php is going to be missing and further Updater runs won’t succeed.

Fortunately it’s straightforward to recover from this: do a manual upgrade.

Thanks for the help! I’m back up and running again — a manual update wasn’t as bad as I expected. (I wasn’t sure how that’d go, being mid-install like I was, and having never done one before…)

I wasn’t able to identify where in the log things broke with the web updater. I can pastebin it somewhere if you are curious to take a look, but my problem is solved.

Thanks again!

1 Like

Glad to hear it. Sure, if you get a chance put it up.