Unable to upgrade from 28.0.6 to 29

Hi.

I can’t update from the admin area to the 29 version.

Nextcloud version: 28.0.6
Operating system and version: Ubuntu 22.04.4 LTS Apache or nginx version: Apache/2.4.52PHP version:8.1.28`

The issue you are facing:

  • Admin area
  • Click at button Open Updater
  • Show message and image on post
  • Click on Continue update
  • Button redirect to dashboard.
Initializing
Current version is 28.0.6.
Update to Nextcloud 29.0.1 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-29.0.1.zip

Is this the first time you’ve seen this error? Y:

The output of your Nextcloud log in Admin > Logging:

No older log entries available

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

<?php
$CONFIG = array (
  'instanceid' => 'ociz9efdik2y',
  'passwordsalt' => '+G1Nibq4qXXXXXXXXXXuC1hNo82vX',
  'secret' => 'gBAAkQ43TzXXXXXXXXXXXXXXXXXXXXXXFyCEHg+mGo',
  'trusted_domains' =>
  array (
    0 => 'diwan.xxxxxxxx.net',
  ),
  'datadirectory' => '/data',
  'dbtype' => 'mysql',
  'version' => '28.0.6.1',
  'overwrite.cli.url' => 'https://diwan.xxxxxxx.net',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'clouduser',
  'dbpassword' => 'xxxxxxxxxxxxxxxx',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'xxxxxxx',
  'mail_domain' => 'xxxxxxx.com',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.xxxxxxxxx.es',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'xxxxxxx@xxxxxxxx.com',
  'mail_smtppassword' => '#xxxxxxxxxxxxxxxx',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'password' => '',
    'dbindex' => 0,
  ),
  'activity_expire_days' => 30,
  'default_phone_region' => 'ES',
  'maintenance' => false,
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => 3,
  'logdateformat' => 'F d, Y H:i:s',
  'theme' => '',
  'trashbin_retention_obligation' => '1, auto',
  'versions_retention_obligation' => '1, auto',
  'maintenance_window_start' => 1,
  'activity_use_cached_mountpoints' => false,
  'updater.secret' => '$2y$10$axxxxxxxxxxxxxxxxxxxxxxxhBN6qQk.x.h2PGbBuNinuy',
  'apc.enable_cli' => true,
);

The output of your Apache/nginx/system log in /var/log/____: filtered for my ip.

Output errors in nextcloud.log no errors

Apreciate help.

  • Click on Continue update
  • Button redirect to dashboard

Please post your updater.log located in your data directory.

Is that when all the green check marks appear? As in, do they instantly all appear and turn green after you click Continue update? If so, it sounds like your prior update didn’t finalize for some reason and left the .step file around.

You can try running the Updater in command line mode. It will likely demonstrate the same behavior, but then you’ll know for certain that is the cause.

The .step file can be manually removed. You should get a warning about it at the command line which will the full path to the file.

But if you want to figure out why this happened, your updater.log will be helpful (hopefully).

Had you just upgraded to 28.0.6 a few minutes before this?

Unrelated, but this line is a PHP config parameter. It doesn’t belong in config.php. It’s invalid there.

Hi

updater.log

Last update is 4 or 5 dyas ago to 28.0.6

.step file is not in /data and not in /var/www/nextcloud/

remove from config.php line 'apc.enable_cli' => true, and restart apache.

Based on your log, the last update (to 28.0.6) completed and the .step was removed. However, based on the startup of the next upgrade cycle (a few hours later), the .step is still there from the last update.

That file is just removed using a standard PHP unlink() call. Nothing special. It’s existence shouldn’t be cached, since unlink() automatically clears the cache. :thinking:

EDIT: I think I know why at least part of the above crossed out part happened.

Did you try running the Updater at the command line as I suggested? It’ll tell you the full path to your .step file.

EDIT: It actually won’t I guess because that step is technically in an end state not a start state.

You can manually clear yours. It’ll likely be located /data/updater-ociz9efdik2y/.step based on what I see in your logs.

After removing the step file, re-trigger the Updater (web or command line but I suggest command line since you’re having problems). It should go through. Also, at the command line, if that run generates some weird error when removing the .step file again that isn’t getting logged, it’ll be visible.

Since your previous Updater runs all worked, it’s weird you’d suddenly run into problems. In the interest of making things better (and if there is a bug, fixing it), can you share more details about the underlying filesystem?

  • filesystem type (e.g. ext4, zfs, nfs, smb, etc.) of /data and /var/www/nextcloud
  • symbolic links in use for /data and/or /var/www/nextcloud

EDIT: See my follow-on reply. I suspect you re-run the Updater before finishing the full upgrade cycle. This, itself, shouldn’t be possible but I think it is in some edge cases. Some additional info might help us determine for certain if that’s what happened in this case (see below).

2024-05-25T05:44:01+0000 RnQG5qanp7 [info] POST request for step "12"
2024-05-25T05:44:01+0000 RnQG5qanp7 [info] startStep("12")
2024-05-25T05:44:01+0000 RnQG5qanp7 [info] finalize()
2024-05-25T05:44:01+0000 RnQG5qanp7 [info] storage location: /data/updater-ociz9efdik2y/downloads/nextcloud/
2024-05-25T05:44:01+0000 RnQG5qanp7 [info] call opcache_reset()
2024-05-25T05:44:01+0000 RnQG5qanp7 [info] end of finalize()
2024-05-25T05:44:01+0000 RnQG5qanp7 [info] endStep("12")
2024-05-25T16:04:58+0000 nD0WAyMOwS [info] request to updater
2024-05-25T16:04:58+0000 nD0WAyMOwS [info] currentStep()
2024-05-25T16:04:58+0000 nD0WAyMOwS [info] Step 12 is in state "end".
2024-05-25T16:04:58+0000 nD0WAyMOwS [info] show HTML page
2024-05-25T16:04:58+0000 nD0WAyMOwS [info] current version: 28.0.6 build time: 2024-05-23T15:26:33+00:00 5481d81792b3eec0fddbb8bf56d78c1188519509

There is a secondary automatic repair step that should have cleaned up the stray .step file.

Any chance the system was shutdown immediately after the Updater ran or something?

The repair steps would be logged in the normal nextcloud.log. Can you post the log entries from your nextcloud.log for the time period between 2024-05-25T05:44:01+0000 and 2024-05-25T16:04:58+0000? For some reason those repair steps didn’t run for you (that’s my hypothesis anyhow).

EDIT: It looks like you had just updated to 28.0.6 ~11 hours prior. Any chance you just hit reload on the web based updater page instead of clicking “Go back to your Nextcloud instance to finish the update”? That might explain what happened since the system hasn’t fully finished the upgrade cycle.

I’m sorry.
I don’t see message.

After delete .step file I can run webupdater (first step) .

Now, other problem. When run in shell sudo -u www-data /usr/bin/php8.1 --define apc.enable_cli=1 /var/www/nextcloud/occ upgrade

...
Starting code integrity check...
Finished code integrity check
Update successful
Maintenance mode is kept active
Resetting log level

But Downgrading is not supported and is likely to cause unpredictable issues (from 29.0.1.1 to 28.0.6.1)

On logs

{
	"reqId": "YU1BLL9OpalfegEHLzV6",
	"level": 3,
	"time": "May 27, 2024 19:07:22",
	"remoteAddr": "0.0.0.0.",
	"user": "egl",
	"app": "remote",
	"method": "GET",
	"url": "/status.php",
	"message": "Exception thrown: OCP\\HintException",
	"userAgent": "Mozilla/5.0 (Windows) mirall/3.12.3stable-Win64 (build 20240328) (Nextcloud, windows-10.0.14393 ClientArchitecture: x86_64 OsArchitecture: x86_64)",
	"version": "29.0.1.1",
	"exception": {
		"Exception": "OCP\\HintException",
		"Message": "Downgrading is not supported and is likely to cause unpredictable issues (from 29.0.1.1 to 28.0.6.1)",
		"Code": 0,
		"Trace": [
			{
				"file": "/var/www/nextcloud/lib/private/legacy/OC_Util.php",
				"line": 505,
				"function": "needUpgrade",
				"class": "OC_Util",
				"type": "::"
			},
			{
				"file": "/var/www/nextcloud/lib/base.php",
				"line": 716,
				"function": "checkServer",
				"class": "OC_Util",
				"type": "::"
			},
			{
				"file": "/var/www/nextcloud/lib/base.php",
				"line": 1200,
				"function": "init",
				"class": "OC",
				"type": "::"
			},
			{
				"file": "/var/www/nextcloud/status.php",
				"line": 37,
				"args": [
					"/var/www/nextcloud/lib/base.php"
				],
				"function": "require_once"
			}
		],
		"File": "/var/www/nextcloud/lib/private/legacy/OC_Util.php",
		"Line": 1162,
		"Hint": "Downgrading is not supported and is likely to cause unpredictable issues (from 29.0.1.1 to 28.0.6.1)",
		"CustomMessage": "Exception thrown: OCP\\HintException"
	}
}

Oop.s

Restart Apache and work fine.

1 Like

Glad you got it working!

I’m still interested in determining what went wrong originally, so that if there’s a bug in the Updater it can be addressed. I’m interested in your response to the following if you get a moment:

It looks like you had just updated to 28.0.6 ~11 hours prior. Any chance you just hit reload on the web based updater page instead of clicking “Go back to your Nextcloud instance to finish the update”? That might explain what happened since the system hasn’t fully finished the upgrade cycle.

Thanks!

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