Error Upgrading to Version 21 / Database problem / Docker Container

Hi all,

My docker instance of Nextcloud is set to auto-upgrade and today it has gone offline. I use watchtower to keep the images up-to date. I tried running the upgrade command, but it does not look happy with the database:

docker exec --user www-data nextcloud php occ upgrade
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
OC\DB\Exceptions\DbalException: Unknown database type enum requested, Doctrine\DBAL\Platforms\MariaDb1027Platform may not support it.
Update failed
Maintenance mode is kept active
Resetting log level

Nextcloud is a docker container running on 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64. and is the latest from the docker hub at the time of writing this.

The database is mariadb, another docker container. A Raspberry pi running VMware ESXi and the photon OS as a guest OS:
4.19.160-3.ph3 #1-photon SMP Thu Dec 10 02:33:38 UTC 2020 aarch64
Version: 10.5.8-MariaDB-1:40.5.8+maria~focal mariadb.org binary distribution
Compiled For: debian-linux-gnu (aarch64)

An extract from config.php file

'dbtype' => 'mysql',
'version' => '20.0.7.1',
'dbname' => 'nextclouddb',
'dbhost' => 'mysql.something.something',
'dbport' => '3306',
'dbtableprefix' => 'oc_',

I can connect to the mysql host and other databases are reachable from their applications (grafana and others).

Any ideas why the upgrade is unhappy?
Any specific log information I can provide to narrow down the problem?

John

1 Like

Getting the same error here using mariadb Ver 15.1 Distrib 10.3.27-MariaDB on Debian 10 “Buster” (without Docker)

here similar error with postgresql: Issues when upgrading to Nextcloud 21 using Docker and PostgreSQL

Here is already an entry on the bug tracker:

Neziak’s modification to MySQLPlatform.php fixed the upgrade for me. See Github post for details.

It have me the important hint: The error was caused not by a table belonging to Nextcloud or a nextcloud app but by tables owned by phpMyAdmin that where in the same database, whose name starts with pma. I dropped them and everything went back to normal.