Can not upgrade 20.0.8

Nextcloud version: 20.0.8
Operating system and version: Ubuntu 20.04.2 LTS
Apache or nginx version: Apache/2.4.41 (Ubuntu)
PHP version: 7.4.3

I am running on 20.0.8. Web updater shows that new version is available. Now its 20.0.11. But I had the same problem when 20.0.10 was available.

If I try to upgrade I get the following result.

martin@nextcloud:/var/www/nextcloud$ sudo -u www-data php updater/updater.phar --no-interaction
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 20.0.8.

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

Updater run in non-interactive mode.

Continue update

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
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.
Updater run in non-interactive mode - will start "occ upgrade" now.

Nextcloud is already latest version

Updater run in non-interactive mode - will disable maintenance mode now.
Maintenance mode already disabled

Maintenance mode is disabled
martin@nextcloud:/var/www/nextcloud$ 

If I run updater.phar a second time I get the same result and so on.

I get the same result using the web updater. The whole printout takes <1 second, so nothing is downloaded.

Steps to replicate it:

  1. sudo -u www-data php updater/updater.phar --no-interaction

Log:

{"reqId":"fS4QsJaFKa7wRk0mVSQM","level":0,"time":"2021-07-10T10:59:20+02:00","remoteAddr":"192.168.31.70","user":"martin","app":"qownnotesapi","method":"GET","url":"/nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0","version":"20.0.8.1"}
{"reqId":"xUWesJRk3zjZKWVRa9P6","level":1,"time":"2021-07-10T10:59:26+02:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for local cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"xUWesJRk3zjZKWVRa9P6","level":1,"time":"2021-07-10T10:59:26+02:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for distributed cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"xUWesJRk3zjZKWVRa9P6","level":0,"time":"2021-07-10T10:59:26+02:00","remoteAddr":"","user":"--","app":"contacts","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.8.1"}
{"reqId":"xUWesJRk3zjZKWVRa9P6","level":0,"time":"2021-07-10T10:59:26+02:00","remoteAddr":"","user":"--","app":"files_sharing","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.8.1"}
{"reqId":"xUWesJRk3zjZKWVRa9P6","level":0,"time":"2021-07-10T10:59:26+02:00","remoteAddr":"","user":"--","app":"qownnotesapi","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.8.1"}
{"reqId":"rxFndijMhklisi0O9gCh","level":1,"time":"2021-07-10T10:59:26+02:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for local cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"rxFndijMhklisi0O9gCh","level":1,"time":"2021-07-10T10:59:26+02:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for distributed cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"rxFndijMhklisi0O9gCh","level":0,"time":"2021-07-10T10:59:26+02:00","remoteAddr":"","user":"--","app":"contacts","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.8.1"}
{"reqId":"rxFndijMhklisi0O9gCh","level":0,"time":"2021-07-10T10:59:26+02:00","remoteAddr":"","user":"--","app":"files_sharing","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.8.1"}
{"reqId":"rxFndijMhklisi0O9gCh","level":0,"time":"2021-07-10T10:59:27+02:00","remoteAddr":"","user":"--","app":"qownnotesapi","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.8.1"}

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

<?php
$CONFIG = array (
  'updatechecker' => false,
  'instanceid' => 'ocf79npf15zn',
  'passwordsalt' => 'xxxx',
  'secret' => 'xxxx',
  'trusted_domains' => 
  array (
    0 => 'xxx',
    1 => 'xxx',
  ),
  'datadirectory' => '/media/ocdata',
  'overwrite.cli.url' => 'xxxx',
  'dbtype' => 'mysql',
  'version' => '20.0.8.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'debby.furuliden.home',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'logtimezone' => 'Europe/Stockholm',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 'furuliden.home',
  'loglevel' => 0,
  'logtype' => 'owncloud',
  'logfile' => '/media/ocdata/nextcloud.log',
  'theme' => '',
  'mail_smtphost' => 'mail.furuliden.home',
  'mail_smtpport' => '1125',
  'mysql.utf8mb4' => true,
  'app_install_overwrite' => 
  array (
    0 => 'calendar',
  ),
  'updater.secret' => '$2y$10$isIuWOPfaX8WNDiwfmPyeu8qcZhClI3ch/z9ZxGk/H4iikTVMU9ma',
);

Hi,

So you get the same result when running that updater in the interactive mode?

/S

Yes. Exact same.

That’s very odd indeed, especially since the updater send to download the correct file for the update.

In your situation I would probably do a manual update, which essentially is the same thing the updater does : backup everything, remove NC while retaining config.pho and data folder, unzipping new version, placing config and data in adequate places, setting file permissions, running OCC upgrade.

https://docs.nextcloud.com/server/latest/admin_manual/maintenance/manual_upgrade.html

I’m having exact the same problem from 20.0.10 to 20.0.11 under CentOS 7 with SELinux set to permissive. As far as can recall, never had a problem with an upgrade. Installation is rock solid.

Manual upgrade is such a pain, there must be something to reset?

1 Like

I looked through the code and for the updater and discovered that it created a .step file in /data/updater-. Renaming the file to .mystep solved the blockage. Both the web updater and the command updater has unchecked steps and ran normal.

The strange observation is that there are two similar files in the directory. The .step file has the following content:

{"state":"end","step":12}

The file .step-previous-update looks like this:

{"state":"end","step":10}

Why this is so and if this is correct would be interesting to know. Anyone knows if the latter file is corrupted and need to be updated to ‘12’ or ?

In my case both .step and .step-previous-update has the same content {“state”:“end”,“step”:12}

@simonspa Did the renaming of .step solve your blockage too?

Yes. Upgrade to 20.0.11 is ongoing…

I wonder if we need to file a bug report on this? Since it happened in two different versions on upgrade to 20.0.11 there might be something buggy here. Or, is this just a 20.0.11 problem?

Any advice anyone?

I don’t think there is much NC can do - the problem is a timeout of the webserver in an unfavorable moment of the upgrade, which leaves the upgrader in the middle between two steps.