Update to 22.2.5 available, but doesn't update to it. Instead says "already latest Version"

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 22.2.4
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.3 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.41
PHP version (eg, 7.4): 8.0.15

The issue you are facing:

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

Steps I remind I have done:

  1. Start Web based Updater and let it do all steps include “Move new files in place”
  2. Do not continue the update. Instead just disable maintenance mode
  3. Restart server
  4. Try now to start the Update from the beginning as usual

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

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxxxxx',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'LOCAL_IP',
    2 => 'PUBLIC_IP',
    3 => 'www.PUBLIC_IP',
  ),
  'trusted_proxies' => 
  array (
    0 => 'PROXY_IP',
  ),
  'datadirectory' => '/mnt/nextcloud/',
  'dbtype' => 'mysql',
  'version' => '22.2.4.3',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'default_phone_region' => 'DE',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'MAIL_DOMAIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'SMTP_SERVER',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'SMTP_USER',
  'mail_smtppassword' => 'SMTP_PWD',
  'mail_smtpsecure' => 'ssl',
  'maintenance' => false,
  'loglevel' => 3,
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' => 
  array (
    0 => 'User',
    1 => 'admin',
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
  'updater.release.channel' => 'stable',
  'updater.secret' => 'xxx',
);

Here is what I get, when trying to update:

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

Current version is 22.2.4.

Update to Nextcloud 22.2.5 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-22.2.5.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

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

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
Nextcloud is already latest version

Keep maintenance mode active? [y/N] n
Maintenance mode already disabled

Maintenance mode is disabled

As soon as I start the command, all hooks are set instantly.

If I start the maintenance mode before execute the code I get:

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

Current version is 22.2.4.

Update to Nextcloud 22.2.5 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-22.2.5.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

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

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
Nextcloud is in maintenance mode - no apps have been loaded

Nextcloud is in maintenance mode
Maybe an upgrade is already in process. Please check the logfile (data/nextcloud.log). If you want to re-run the upgrade procedure, remove the "maintenance mode" from config.php and call this script again.

Keep maintenance mode active? [y/N] n
Maintenance mode disabled

Maintenance mode is disabled

Remove the line “maintenance mode” from config doesn’t help

1 Like

Same now with version 22.2.6.

I am stuck at version 22.2.4. I cannot upgrade anymore. No one has an idea?

Has no-one an idea?

Problem probably also in Nextcloud 23

The problem seems to be a file named .step in the <data_dir>/updater-xxxxxxxxxxxxx folder.

root@pi /nc/updater-51520bfa8e011 # ll -a
insgesamt 24
drwxr-x---  4 www-data www-data 4096 Feb 17 15:01 .
drwxr-x--- 17 www-data www-data 4096 Mär 27 00:00 ..
drwxr-x---  3 www-data www-data 4096 Mär 24 21:20 backups
drwxr-x---  2 www-data www-data 4096 Feb 17 15:01 downloads
-rw-r-----  1 www-data www-data   25 Feb 17 15:01 .step
-rw-r-----  1 www-data www-data   25 Feb 17 14:57 .step-previous-update

I have examined the file .step and .step-previous-update:

root@pi /nc/updater-51520bfa8e011 # cat .step
{"state":"end","step":12}
root@pi /nc/updater-51520bfa8e011 # cat .step-previous-update
{"state":"end","step":10}

I renamed the file .step, now the update works. After success update:

root@pi /nc/updater-51520bfa8e011 # cat .step
cat: .step: Datei oder Verzeichnis nicht gefunden [file or directory not found
root@pi /nc/updater-51520bfa8e011 # cat .step-previous-update
{"state":"end","step":10}

It seems the previous update left the file .step in place.

4 Likes

Thank you for your response :smiley:

but I haven’t a folder called updater-****

Where exactly I need to look?

name@nextcloud:/var/www/nextcloud$  ll -a
total 168
drwxr-xr-x 14 www-data www-data  4096 Jan 31 11:09 ./
drwxr-xr-x  4 root     root      4096 Nov 15 18:49 ../
drwxr-xr-x 44 www-data www-data  4096 Jan 31 11:09 3rdparty/
drwxr-xr-x 74 www-data www-data  4096 Mär 20 06:27 apps/
-rwxrwx---  1 www-data www-data 19327 Jan 31 11:08 AUTHORS*
drwxr-xr-x  2 www-data www-data  4096 Mär 30 05:45 config/
-rwxrwx---  1 www-data www-data  3924 Jan 31 11:08 console.php*
-rwxrwx---  1 www-data www-data 34520 Jan 31 11:08 COPYING*
drwxr-xr-x 22 www-data www-data  4096 Jan 31 11:06 core/
-rwxrwx---  1 www-data www-data  5163 Jan 31 11:09 cron.php*
drwxr-xr-x  2 www-data www-data  4096 Mär 30 05:33 data/
-rwxrwx---  1 www-data www-data  3250 Jan 31 11:10 .htaccess*
-rwxrwx---  1 www-data www-data   156 Jan 31 11:08 index.html*
-rwxrwx---  1 www-data www-data  3455 Jan 31 11:09 index.php*
drwxr-xr-x  6 www-data www-data  4096 Jan 31 11:08 lib/
-rwxr-xr-x  1 www-data www-data   283 Jan 31 11:06 occ*
drwxr-xr-x  2 www-data www-data  4096 Jan 31 11:06 ocm-provider/
drwxr-xr-x  2 www-data www-data  4096 Jan 31 11:08 ocs/
drwxr-xr-x  2 www-data www-data  4096 Jan 31 11:06 ocs-provider/
-rwxrwx---  1 www-data www-data  3139 Jan 31 11:09 public.php*
-rwxrwx---  1 www-data www-data  5340 Jan 31 11:09 remote.php*
drwxr-xr-x  4 www-data www-data  4096 Jan 31 11:08 resources/
-rwxrwx---  1 www-data www-data    26 Jan 31 11:08 robots.txt*
-rwxrwx---  1 www-data www-data  2452 Jan 31 11:09 status.php*
drwxr-xr-x  3 www-data www-data  4096 Jan 31 11:06 themes/
drwxr-xr-x  2 www-data www-data  4096 Nov 12 16:54 updater/
-rwxrwx---  1 www-data www-data   101 Jan 31 11:06 .user.ini*
-rwxrwx---  1 www-data www-data   422 Jan 31 11:08 version.php*
name@nextcloud:/var/www/nextcloud$ cd data && ll -a
total 20
drwxr-xr-x  2 www-data www-data 4096 Mär 30 05:33 ./
drwxr-xr-x 14 www-data www-data 4096 Jan 31 11:09 ../
-rw-r--r--  1 www-data www-data  542 Nov 16 04:57 .htaccess
-rw-r--r--  1 www-data www-data    0 Nov 16 04:57 index.html
-rw-r-----  1 www-data www-data 4744 Nov 16 04:57 nextcloud.log
name@nextcloud:/var/www/nextcloud/data$ cd .. && cd updater && ll -a
total 664
drwxr-xr-x  2 www-data www-data   4096 Nov 12 16:54 ./
drwxr-xr-x 14 www-data www-data   4096 Jan 31 11:09 ../
-rwxrwx---  1 www-data www-data  66309 Mär 14 09:35 index.php*
-rwxrwx---  1 www-data www-data 600659 Mär 14 09:35 updater.phar*

Edit:

Oh forget it. I found it and I’ll give your solution a try now.

Yepp…Seems to work. Thank you and the guys from the other thread.