[SOLVED] Issue upgrading to Nextcloud 29.0.1 from 29.0.0?

Nextcloud version (eg, 20.0.5): 29.0.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04.4
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.52
PHP version (eg, 7.4): php 8.2.19

The issue you are facing:

Nextcloud is showing an update to 29.0.1 as available, yet the web isntaller hangs at step 3 (creating backup). I can re-trigger it deleting the .step file but get the same results. If I then try to do the upgrade via occ, an update is shown when I check, but it says no update available when I go to run it.

root@sr66-nxt-01:/var/www/nextcloud/data# sudo -u www-data php /var/www/nextcloud/occ update:check
Nextcloud 29.0.1 is available. Get more information on how to update at https://docs.nextcloud.com/server/29/admin_manual/maintenance/upgrade.html.
1 update available
root@sr66-nxt-01:/var/www/nextcloud/data# sudo -u www-data php /var/www/nextcloud/occ upgrade
Nextcloud is already latest version

This seems to matter as I am having trouble installing an app, I go to install the “3D Model Viewer” app and after spinning for a while, it comes back to “Download and enable”. There is nothing in the logs about this, which is strange?

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

Steps to replicate it:

  1. Attempt web upgrade, observe failure.
  2. Delete .step file
  3. Check for updates with sudo -u www-data php /var/www/nextcloud/occ update:check
  4. Attempt to install updates via sudo -u www-data php /var/www/nextcloud/occ upgrade

The output of your Nextcloud log in Admin > Logging:

Just this over and over since upgrade to 29
![image|690x20](upload://gieJ2M5dc8PWk8eUpjbbzABVbty.png)

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

<?php
$CONFIG = array (
  'instanceid' => '-----------------',
  'passwordsalt' => '--------------',
  'secret' => '---------------------',
  'trusted_domains' => 
  array (
    0 => 'subdomain.domain.com',
    1 => 'domain.com',
    2 => 'nextcloud.domain.com',
    3 => 'sr66-nxt-01.subdomain.domain.com',
  ),
  'trusted_proxies' => 
  array (
    0 => '10.2.2.212',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'defaultapp' => 'files',
  'version' => '29.0.0.19',
  'overwritehost' => 'nextcloud.domain.com',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/',
  'overwrite.cli.url' => 'https://nextcloud.domain.com',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'nextcloud',
  'dbhost' => 'sr66-sql-02.subdomain.domain.com:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'usr_nextcloud',
  'dbpassword' => '---------------',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'maintenance' => false,
  'theme' => '',
  'localstorage.umask' => 2,
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => 2,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'sendmail',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'sr66-nxt-01.subdomain.domain.com',
  'mail_smtphost' => 'localhost',
  'mail_smtpport' => '25',
  'default_phone_region' => 'US',
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'app_install_overwrite' => 
  array (
    0 => 'files_3d',
    1 => 'files_texteditor',
    2 => 'printer',
    3 => 'epubreader',
    4 => 'richdocumentscode',
    5 => 'breezedark',
    6 => 'apporder',
    7 => 'ldap_write_support',
  ),
  'trashbin_retention_obligation' => 'auto,15',
  'allow_local_remote_servers' => true,
  'mail_smtpsecure' => 'ssl',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
    'dbindex' => 0,
    'password' => '',
    'timeout' => 1.5,
  ),
  'enforce_theme' => '',
  'updater.release.channel' => 'stable',
  'maintenance_window_start' => 9,
);

The output of your Apache/nginx/system log in /var/log/____:

cat /var/log/apache2/error.nextcloud.log
[Fri May 24 09:53:16.510832 2024] [proxy_fcgi:error] [pid 3416:tid 139891019073088] (70007)The timeout specified has expired: [client 10.2.2.212:46446] AH01075: Error dispatching request to : (polling)
[Fri May 24 09:58:10.867508 2024] [access_compat:error] [pid 3417:tid 139891069396544] [client 10.2.2.212:43532] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri May 24 09:58:13.001357 2024] [access_compat:error] [pid 3416:tid 139890993894976] [client 10.2.2.212:60172] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri May 24 09:59:02.243021 2024] [proxy_fcgi:error] [pid 3416:tid 139890910033472] (70007)The timeout specified has expired: [client 10.2.2.212:55732] AH01075: Error dispatching request to : (polling)
[Fri May 24 10:02:52.613462 2024] [proxy_fcgi:error] [pid 14819:tid 139890910033472] (70007)The timeout specified has expired: [client 10.2.2.212:41450] AH01075: Error dispatching request to : (polling)
[Fri May 24 11:06:38.958763 2024] [proxy_fcgi:error] [pid 14819:tid 139891413333568] (70007)The timeout specified has expired: [client 10.2.2.212:45920] AH01075: Error dispatching request to : (polling)

occ upgrade is not the command line Updater. That only runs the db migrations after a successful Updater run. You are looking for updater.phar. Please see the Admin Manual for using Updater from the command line: Upgrade via built-in updater — Nextcloud latest Administration Manual latest documentation

As for step 3, there may be further details in your updater.log. It’s also possible running it from the command line will provide additional output not visible from web mode or the updater.log.

Note you have some apps in this list that are likely incompatible. If they’re installed currently that will be problematic. This config directive contains all the incompatible apps you’ve forced enabled at some point.

I’d suggest clearing the list and reviewing their app store entries to make sure they’re working with v29. Having them in this list bypasses the built-in compatibility checks.

That is a good shout, I disabled the whole list (some of them are long uninstalled, I haven’t revisited that config in years). Lemme try again.

Ok, I deleted the .step file, removed the plugin block in the config and tried again to the same result. I pulled up “updater.log” and this is the contents:

2024-05-24T20:29:37+0000 Vrg7CG917R [info] request to updater
2024-05-24T20:29:37+0000 Vrg7CG917R [info] currentStep()
2024-05-24T20:29:37+0000 Vrg7CG917R [info] show HTML page
2024-05-24T20:29:37+0000 Vrg7CG917R [info] current version: 29.0.0 build time: 2024-04-23T15:11:45+00:00 744e0ddb1e9117a1d912ff29dfdac62d1e1dc72e
2024-05-24T20:29:37+0000 Vrg7CG917R [info] getUpdateServerResponse()
2024-05-24T20:29:37+0000 Vrg7CG917R [info] updaterServer: https://updates.nextcloud.com/updater_server/
2024-05-24T20:29:37+0000 Vrg7CG917R [info] releaseChannel: stable
2024-05-24T20:29:37+0000 Vrg7CG917R [info] internal version: 29.0.0.19
2024-05-24T20:29:37+0000 Vrg7CG917R [info] updateURL: https://updates.nextcloud.com/updater_server/?version=29x0x0x19xxxstablexx2024-04-23T15%3A11%3A45%2B00%3A00+744e0ddb1e9117a1d912ff29dfdac62d1e1dc72ex8x2x19
2024-05-24T20:29:38+0000 Vrg7CG917R [info] getUpdateServerResponse response: Array
(
    [version] => 29.0.1.1
    [versionstring] => Nextcloud 29.0.1
    [url] => https://download.nextcloud.com/server/releases/nextcloud-29.0.1.zip
    [web] => https://docs.nextcloud.com/server/29/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=29.0.1
    [autoupdater] => 1
    [eol] => 0
    [signature] => MV1tA/Qtn5SUMSOPiu9c1N3PEL09AO7PKduaQGYXlWIRA+qJcJfq6YtN4W0QvSDa
Ko/j4KcpAM0w8b3O+qOJOFApDo3vHVH3mqNLnyL6+SYKTob2Kclnnx9Fke1tozvi
ki29GZmbff8KNPuSSYOt2HTY73bh0Esit73+jIufsOciMNyAtOd47TtkAKfK/fNI
DbGT9YJn0gi3ulQ9zfMRFhK+yP4S5WQY43RFPp8qzjA44pgLn2IMu9HmH0Mz36dd
myRG4PG3IaLxfIF3O3/xhvEpqz0BSrJRAIptAZ9YdQZjt+bkh1DoW0HtkN+4FVp4
0DAbpdTSYEu6OUzAFq8I1g==
)

2024-05-24T20:29:38+0000 Vrg7CG917R [info] checkForUpdate() Array
(
    [version] => 29.0.1.1
    [versionstring] => Nextcloud 29.0.1
    [url] => https://download.nextcloud.com/server/releases/nextcloud-29.0.1.zip
    [web] => https://docs.nextcloud.com/server/29/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=29.0.1
    [autoupdater] => 1
    [eol] => 0
    [signature] => MV1tA/Qtn5SUMSOPiu9c1N3PEL09AO7PKduaQGYXlWIRA+qJcJfq6YtN4W0QvSDa
Ko/j4KcpAM0w8b3O+qOJOFApDo3vHVH3mqNLnyL6+SYKTob2Kclnnx9Fke1tozvi
ki29GZmbff8KNPuSSYOt2HTY73bh0Esit73+jIufsOciMNyAtOd47TtkAKfK/fNI
DbGT9YJn0gi3ulQ9zfMRFhK+yP4S5WQY43RFPp8qzjA44pgLn2IMu9HmH0Mz36dd
myRG4PG3IaLxfIF3O3/xhvEpqz0BSrJRAIptAZ9YdQZjt+bkh1DoW0HtkN+4FVp4
0DAbpdTSYEu6OUzAFq8I1g==
)

2024-05-24T20:29:38+0000 Vrg7CG917R [info] getChangelogURL()
2024-05-24T20:29:38+0000 Vrg7CG917R [info] end of checkForUpdate() Update to Nextcloud 29.0.1 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-29.0.1.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#29-0-1" target="_blank" rel="noreferrer noopener">Open changelog ?</a>
2024-05-24T20:29:39+0000 mqxAN3SJkX [info] request to updater
2024-05-24T20:29:39+0000 mqxAN3SJkX [info] currentStep()
2024-05-24T20:29:39+0000 mqxAN3SJkX [info] POST request for step "1"
2024-05-24T20:29:39+0000 mqxAN3SJkX [info] startStep("1")
2024-05-24T20:29:39+0000 mqxAN3SJkX [info] checkForExpectedFilesAndFolders()
2024-05-24T20:29:39+0000 mqxAN3SJkX [info] end of checkForExpectedFilesAndFolders()
2024-05-24T20:29:39+0000 mqxAN3SJkX [info] endStep("1")
2024-05-24T20:29:40+0000 HXDSLZiur4 [info] request to updater
2024-05-24T20:29:40+0000 HXDSLZiur4 [info] currentStep()
2024-05-24T20:29:40+0000 HXDSLZiur4 [info] Step 1 is in state "end".
2024-05-24T20:29:40+0000 HXDSLZiur4 [info] POST request for step "2"
2024-05-24T20:29:40+0000 HXDSLZiur4 [info] startStep("2")
2024-05-24T20:29:40+0000 HXDSLZiur4 [info] checkWritePermissions()
2024-05-24T20:29:40+0000 HXDSLZiur4 [info] end of checkWritePermissions()
2024-05-24T20:29:40+0000 HXDSLZiur4 [info] endStep("2")
2024-05-24T20:29:40+0000 0gFlWR6HaH [info] request to updater
2024-05-24T20:29:40+0000 0gFlWR6HaH [info] currentStep()
2024-05-24T20:29:40+0000 0gFlWR6HaH [info] Step 2 is in state "end".
2024-05-24T20:29:40+0000 0gFlWR6HaH [info] POST request for step "3"
2024-05-24T20:29:40+0000 0gFlWR6HaH [info] startStep("3")
2024-05-24T20:29:40+0000 0gFlWR6HaH [info] createBackup()
2024-05-24T20:29:40+0000 0gFlWR6HaH [info] backup folder location: /var/www/nextcloud/data/updater-ocjpnfl6nab4/backups/nextcloud-29.0.0.19-1716582580/
2024-05-24T20:31:55+0000 ys1Xeci2Ti [info] end of createBackup()
2024-05-24T20:31:55+0000 0gFlWR6HaH [info] end of createBackup()
2024-05-24T20:31:55+0000 0gFlWR6HaH [info] endStep("3")
2024-05-24T20:31:55+0000 ys1Xeci2Ti [info] endStep("3")

This is what I get in the updater UI when doing “Retry Upgrade”:
image

And as far as I can tell, the backups are successfully getting created:

root@sr66-nxt-01:/var/www/nextcloud/data/updater-ocjpnfl6nab4/backups# du -h --max-depth=1
1.3G    ./nextcloud-29.0.0.19-1716582580
1.3G    ./nextcloud-29.0.0.19-1716582314
2.6G    .

Can you try the command line mode of the Updater? Something weird may be occurring that is causing things to crash outright and not appear in the log.

Trying that next, balancing a work thing but will get back as soon as possible.

Ok, CLI updater worked. Thanks for the guidance!

1 Like

Similar issue:
2024-05-24T23:07:09+0200 RXhhCXeWqM [info] POST request for step “4”
2024-05-24T23:07:09+0200 RXhhCXeWqM [error] POST request failed with other exception
2024-05-24T23:07:09+0200 RXhhCXeWqM [error] Exception: Exception
Message: Not authenticated
Code:0
Trace:
#0 {main}
File:/var/www/nextcloud/updater/index.php
Line:1325

Sounds like it may have just been a timeout on the web server/PHP side of things in that case. The command line mode is always the most reliable and recommended method for running Updater in part for this reason. Glad you got it working!

@redbird Yours is a very different scenario/underlying cause. Can you create a dedicated thread/post for your matter?

The CLI updater also solved this issue.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.