Help - I messed my Nextcloud installation: Maintenance Mode again!

Today I finally tried to update one of two nextcloud installations.

The UCS is up to date 5.0-9 errata1187. Nextcloud was on 25.0.13-0

  • Started updating by using UMC. No error message.

  • Tried to login: Maintenance mode.

  • UMC offered another update which I clicked (26.0.10 to 27.1.6) - probably shouldn’t have done that

  • Tried to login: Maintenance mode.

  • Uninstalled NC and reinstalled it: did not help (28.0.7 installed …) - probably shouldn’t have done that either

  • Seached this forum and found Nextcloud 18.0.4 Maintenance mode - #8 by Mornsgrans

  • Tried: univention-app shell nextcloud sudo -u www-data /var/www/html/occ upgrade giving me:

Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Setting log level to debug Turned on maintenance mode Exception: Updates between multiple major versions and downgrades are unsupported. Update failed Maintenance mode is kept active Resetting log level

Version.php shows this:

<?php 
$OC_Version = array(28,0,7,4);
$OC_VersionString = '28.0.7';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
  'nextcloud' => 
  array (
    '27.0' => true,
    '27.1' => true,
    '28.0' => true,
  ),
  'owncloud' => 
  array (
    '10.13' => true,
  ),
);
$OC_Build = '2024-06-25T10:17:03+00:00 578068e1d8e9275f6762b8c1cdc9b2bf6ca911b1';
$vendor = 'nextcloud';

What can I do to get the thing running again ? Am I facing the same problems when updating my other installation which is still on 24.0.7 ?

Any suggestions are welcome. My wife is killing me - she cannot access her calendars anymore :worried:

The maintenance mode has a special reason.
After upgrading you should have seen one or more messages, which commands have to be executed to turn off the maintenance mode. You should find concerning entries in the log files.

Sometimes the following occ commands I needed:

univention-app shell nextcloud 
sudo -u www-data php /var/www/html/occ db:convert-filecache-bigint  # maybe with parameter --no-interaction
sudo -u www-data php /var/www/html/occ db:add-missing-columns
sudo -u www-data php /var/www/html/occ db:add-missing-indices
sudo -u www-data php /var/www/html/occ maintenance:mode --off
exit

Nextcloud Updates only should be installed via Univention App-Center, to be sure, that all values in Univention Registry become updated.

Okay, in the meantime I was able to fix it. What I did:

  • uninstalled nextcloud via UMC
  • installed nextcloud 26.0. by issuing univention-app install nextcloud=26.0.10-0
  • issued sudo -u www-data php /var/www/html/occ maintenance:mode --off
  • tried to login: no passwords were accepted
  • removed nextcloud from the command line univention-app remove nextcloud
  • re-installed nextcloud 26.0. by issuing univention-app install nextcloud=26.0.10-0
  • login possible, filesharing worked, calendar app was missing, calendar clients could not connect
  • logged in as administrator and loaded the calendar app from the nextcloud store

Now everything works again and nextcloud 26.0 is shown as installed (App-center update available to 27.1.6-0 - should I dare … ?)

Make sure you log into nextcloud as administrator before any nextcloud upgrade and update any apps that need updating and correct any important items listed on the security and warnings page of the administration settings. Usually the items that really need to be taken care of before an upgrade are the db things as mentioned above. Some of the warnings can be ignored or are related to the docker apps web config and I have left those alone.

I haven’t had any issues with upgrades that I can recall as long as I check these things first.

1 Like

Thanks, I didn’t know that nextcloud apps require extra updates. Will take care of that.

Mastodon