Update from 23.0.1 to 23.0.12 stuck with error

When I tried to update my nextcloud version on a hosted system via the web updater, it get stuck in maintenance mode by an error.
How can I get out of this (maintenance mode)?

Nextcloud version: start version 23.0.1, goal version 23.0.12
Operating system and version: managed host on linux machine
Apache or nginx version: unknown
PHP version: 8.0.30

The issue you are facing:

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

Steps to replicate it:

  1. start update with button in the settings
  2. first part of update worked fine
  3. final update stuck after several changes

The output on the screen was:

Detailed logs
Preparing update
Set log level to debug
Turned on maintenance mode
Repair step: Repair MySQL collation
Repair info: All tables already have the correct collation -> nothing to do
Repair step: Repair SQLite autoincrement
Repair step: Copy data from accounts table when migrating from ownCloud
Repair step: Drop account terms table when migrating from ownCloud
Updating database schema
Updated database
Repair step: Upgrading Circles App
Updated "circles" to 23.1.2
Updated "notifications" to 2.11.2
Updated "text" to 3.4.1
Update app "calendar" from App Store
Repair step: Update name of the stored view
Update app "contacts" from App Store
Update app "richdocuments" from App Store
Update app "spreed" from App Store
Repair step: Fix the namespace in database tables
Repair step: Create help command
Repair step: Invalidate access cache for projects conversation provider
Repair info: Invalidation not required
Repair step: Cache the user display names
An error occurred.

The output of your Nextcloud log in Admin > Logging:
I have no access to such a log

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

  'instanceid' => 'oc...71v3',
  'passwordsalt' => 'qd...GsD',
  'secret' => '...',
  'trusted_domains' => 
  array (
    0 => '.....c20.webspace-verkauf.de',
  ),
  'datadirectory' => '/ /....c20.webspace-verkauf.de/httpdocs/...',
  'dbtype' => 'mysql',
  'version' => '23.0.2.1',
  'overwrite.cli.url' => 'http://.....c20.webspace-verkauf.de',
  'dbname' => 'xxx',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'maintenance' => true,
  'updater.secret' => '$2y...K6eGGQd.',
  'theme' => '',
  'loglevel' => 0,
);

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

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
nextcloud.log not found

First, you need to fix the error. Therefore you need to know what went wrong! The message

… is not very comprehensive.

Turning off maintenance mode should only result in an error message that requires you to complete the update process.

Do you have access to the console or do you only have access to the web frontend?

In the latter case, you need to ask your hoster for help.


Much and good luck,
ernolf

Thanks ernolf for your fast reply.
No I have no access to the console, only to the web frontend.
Ok, asking the hoster for help, but what should I tell them in this case? What can be the steps they can do for me?
Nextcloud is not an official application of the hoster…

So how did you ever install it?
How are your cronjobs done? Can you run cronjobs?
If so, then you can run a one-time cronjob like this:

php -f /path/to/your/nextcloud/occ --verbose --no-interaction upgrade >> /path/to/your/space/upgrade.log 2>&1

which hopefully will complete your update process.
Choose a path for the logfile that is outside of the webspace.

BTW:

  • You can find the nextcloud- and the update logfiles inside of your data/ directory.

  • You can disable maintenance mode by changing

      'maintenance' => true,
    

    into

      'maintenance' => false,
    

    in your config/config.php. But as I said, It will propably only show a warning but you can try.

hth.


ernolf

Installation always worked with the webinstaller. After initial installation I had to ask the admins of my hoster to adapt some settings, but that’s it. All the last updates worked fine too with the webinstaller.
I can’t run myself some of the commands, because I have no access to ssh.
I tried setting maintenance to false and the website shows again the last step for the update, see attachment. When trying it, it runs into the same error.

Exactly as I predicted.

And what about the other question I asked concerning cron?

If you can ask your admin, ask him to execute that occ command on the console. If he knows nextcloud, he will know what you mean.


ernolf

Ah yeah, executing cron jobs are not allowed to me too.
Regarding that command, I already send a ticket and I hope they will execute it, but it may take some time. Will come back later, when I got an answer. Thanks for now!

So now I got a reply and they told me that in the meantime I will be able to execute cronjobs :slight_smile:
I started this job, but got in the upgrade.log file only the hint of how to use the php command, see below.
I checked the directory once again, it is correct and the occ file is also there.
Is there anything else which I need to know about executing as cronjob?

Usage: php [options] [-f] [–] [args…]
php [options] -r [–] [args…]
php [options] [-B <begin_code>] -R [-E <end_code>] [–] [args…]
php [options] [-B <begin_code>] -F [-E <end_code>] [–]

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