Upgrade failed from 20 to 21

Support intro

Hi All i have tryed to upgrade NC from 20 to 21 but i have cryptic database error that leaves me quite puzzled.

Exception: Database error when running migration latest for app core

Manual upgrade don’t return any other usefoul informations

root@services:/var/www/html/nextcloud# sudo -u www-data 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
Updating database schema
Exception: Database error when running migration latest for app core
Update failed

Nextcloud version (eg, 20.0.5): 20.0.14
Operating system and version (eg, Ubuntu 20.04): Ubuntu LTS 18.04.5
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.29
PHP version (eg, 7.4): PHP 7.4.16 (cli)

The issue you are facing:

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

Steps to replicate it:

  1. Upgrade from 20 to 20 latest build to latest build

The output of your Nextcloud log in Admin > Logging:

can't login

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

$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'cloud.example.org',
    1 => 'cloud.example.org/nextcloud',
  ),
  'datadirectory' => '/mnt/HC_Volume_4932186/nextcloud_data',
  'dbtype' => 'mysql',
  'version' => '20.0.14.2',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextclouduser',
  'dbpassword' => '',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => '',
  'mail_domain' => '',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '',
  'mail_smtpport' => '465',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'maintenance' => false,
  'mysql.utf8mb4' => true,
  'updater.release.channel' => 'stable',
  'loglevel' => 2,
  'theme' => '',
  'encryption.legacy_format_support' => true,
  'encryption.key_storage_migrated' => false,
  'updater.secret' => '',
);

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

No errors

I’ve tryed the compressed table in
innodb_read_only_compressed=OFF
But if add this line in the config maria db don’t start

Nov 22 09:56:04 services systemd[1]: Starting MariaDB 10.1.47 database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mariadb.service has begun starting up.
Nov 22 09:56:04 services mysqld[3199]: 2021-11-22  9:56:04 139817193127040 [Note] /usr/sbin/mysqld (mysqld 10.1.47-MariaDB-0ubuntu0.18.04.1) starting as process 3199 ...
Nov 22 09:56:07 services systemd[1]: mariadb.service: Main process exited, code=exited, status=7/NOTRUNNING
Nov 22 09:56:07 services systemd[1]: mariadb.service: Failed with result 'exit-code'.
Nov 22 09:56:07 services systemd[1]: Failed to start MariaDB 10.1.47 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mariadb.service has failed.
--
-- The result is RESULT.
Nov 22 09:56:10 services kernel: [UFW BLOCK] IN=eth0 OUT= MAC=96:00:00:4b:a3:2a:d2:74:7f:6e:37:e3:08:00 SRC=185.163.110.74 DST=94.130.175.29 LEN=40 TOS=0x00 PREC=0x00 TTL=243 ID=15050 PROTO=TCP SPT=12732 DPT=8081 WINDOW=1024 RES=0x00 SYN URGP=0

updater.log

(
    [version] => 21.0.7.0
    [versionstring] => Nextcloud 21.0.7
    [url] => https://download.nextcloud.com/server/releases/nextcloud-21.0.7.zip
    [web] => https://docs.nextcloud.com/server/21/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=21.0.7
    [autoupdater] => 1
    [eol] => 0
    [signature] => X6XppxNBXwUCKDb6bl8i6a6doM4BMUDy9XI1fK2mQEfUU8MhqxDkGurgNdaXUadd
GZTyuv+okUiqrW+ujwPWZxADyAUT/hLtkDeNUHBEjGtPTZs9Kd+YbhllkotqDek0
73W0jM2qvXfAHaw+8luGzdpjbIdIwA0OmHL81Xy/6fDy0zJazesuGKnKZyUqwMsU
AvCKJj9NSSnQ9qcW82AsISOaSaMdEJAAEl7YkCJD7b47VzbLmBiypvpIXQHfOmun
pkdMR/KiTF8URW0KN6EH/nHo556CKHVNu9ADWhVgtH7EkpbyKhHisOYsefAxSsbJ
KnTQJ0WYNAKFDXH/BH/2kw==
)

2021-11-22T09:07:04+0100 zQ50cmH43m [info] checkForUpdate() Array
(
    [version] => 21.0.7.0
    [versionstring] => Nextcloud 21.0.7
    [url] => https://download.nextcloud.com/server/releases/nextcloud-21.0.7.zip
    [web] => https://docs.nextcloud.com/server/21/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=21.0.7
    [autoupdater] => 1
    [eol] => 0
    [signature] => X6XppxNBXwUCKDb6bl8i6a6doM4BMUDy9XI1fK2mQEfUU8MhqxDkGurgNdaXUadd
GZTyuv+okUiqrW+ujwPWZxADyAUT/hLtkDeNUHBEjGtPTZs9Kd+YbhllkotqDek0
73W0jM2qvXfAHaw+8luGzdpjbIdIwA0OmHL81Xy/6fDy0zJazesuGKnKZyUqwMsU
AvCKJj9NSSnQ9qcW82AsISOaSaMdEJAAEl7YkCJD7b47VzbLmBiypvpIXQHfOmun
pkdMR/KiTF8URW0KN6EH/nHo556CKHVNu9ADWhVgtH7EkpbyKhHisOYsefAxSsbJ
KnTQJ0WYNAKFDXH/BH/2kw==
)

2021-11-22T09:07:04+0100 zQ50cmH43m [info] getChangelogURL()
2021-11-22T09:07:04+0100 zQ50cmH43m [info] end of checkForUpdate() Update to Nextcloud 21.0.7 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-21.0.7.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#21-0-7" target="_blank" rel="noreferrer noopener">Open changelog ↗</a>
2021-11-22T09:07:09+0100 V8PlfIg1WE [info] request to updater
2021-11-22T09:07:09+0100 V8PlfIg1WE [info] currentStep()
2021-11-22T09:07:09+0100 V8PlfIg1WE [info] POST request for step "1"
2021-11-22T09:07:09+0100 V8PlfIg1WE [info] startStep("1")
2021-11-22T09:07:09+0100 V8PlfIg1WE [info] checkForExpectedFilesAndFolders()
2021-11-22T09:07:09+0100 V8PlfIg1WE [info] end of checkForExpectedFilesAndFolders()
2021-11-22T09:07:09+0100 V8PlfIg1WE [info] endStep("1")
2021-11-22T09:07:09+0100 DJjXP40UIt [info] request to updater
2021-11-22T09:07:09+0100 DJjXP40UIt [info] currentStep()
2021-11-22T09:07:09+0100 DJjXP40UIt [info] Step 1 is in state "end".
2021-11-22T09:07:09+0100 DJjXP40UIt [info] POST request for step "2"
2021-11-22T09:07:09+0100 DJjXP40UIt [info] startStep("2")
2021-11-22T09:07:09+0100 DJjXP40UIt [info] checkWritePermissions()
2021-11-22T09:07:09+0100 DJjXP40UIt [info] end of checkWritePermissions()
2021-11-22T09:07:09+0100 DJjXP40UIt [info] endStep("2")
2021-11-22T09:07:09+0100 QM7eTCzmaB [info] request to updater
2021-11-22T09:07:09+0100 QM7eTCzmaB [info] currentStep()
2021-11-22T09:07:09+0100 QM7eTCzmaB [info] Step 2 is in state "end".
2021-11-22T09:07:09+0100 QM7eTCzmaB [info] POST request for step "3"
2021-11-22T09:07:09+0100 QM7eTCzmaB [info] startStep("3")
2021-11-22T09:07:09+0100 QM7eTCzmaB [info] createBackup()
2021-11-22T09:07:09+0100 QM7eTCzmaB [info] backup folder location: /mnt/HC_Volume_4932186/nextcloud_data/updater-oc6rdysuzom0/backups/nextcloud-20.0.14.2-1637568429/
2021-11-22T09:07:20+0100 QM7eTCzmaB [info] end of createBackup()
2021-11-22T09:07:20+0100 QM7eTCzmaB [info] endStep("3")
2021-11-22T09:07:20+0100 48CooEkkSg [info] request to updater
2021-11-22T09:07:20+0100 48CooEkkSg [info] currentStep()
2021-11-22T09:07:20+0100 48CooEkkSg [info] Step 3 is in state "end".
2021-11-22T09:07:20+0100 48CooEkkSg [info] POST request for step "4"
2021-11-22T09:07:20+0100 48CooEkkSg [info] startStep("4")
2021-11-22T09:07:20+0100 48CooEkkSg [info] downloadUpdate()
2021-11-22T09:07:20+0100 48CooEkkSg [info] getUpdateServerResponse()
2021-11-22T09:07:20+0100 48CooEkkSg [info] updaterServer: https://updates.nextcloud.com/updater_server/
2021-11-22T09:07:20+0100 48CooEkkSg [info] releaseChannel: stable
2021-11-22T09:07:20+0100 48CooEkkSg [info] internal version: 20.0.14.2
2021-11-22T09:07:20+0100 48CooEkkSg [info] updateURL: https://updates.nextcloud.com/updater_server/?version=20x0x14x2xxxstablexx2021-11-11T15%3A12%3A13%2B00%3A00+50221f94abea4f26710091d94f2930a0322036bcx7x4x16
2021-11-22T09:07:20+0100 48CooEkkSg [info] getUpdateServerResponse response: Array
(
    [version] => 21.0.7.0
    [versionstring] => Nextcloud 21.0.7
    [url] => https://download.nextcloud.com/server/releases/nextcloud-21.0.7.zip
    [web] => https://docs.nextcloud.com/server/21/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=21.0.7
    [autoupdater] => 1
    [eol] => 0
    [signature] => X6XppxNBXwUCKDb6bl8i6a6doM4BMUDy9XI1fK2mQEfUU8MhqxDkGurgNdaXUadd
GZTyuv+okUiqrW+ujwPWZxADyAUT/hLtkDeNUHBEjGtPTZs9Kd+YbhllkotqDek0
73W0jM2qvXfAHaw+8luGzdpjbIdIwA0OmHL81Xy/6fDy0zJazesuGKnKZyUqwMsU
AvCKJj9NSSnQ9qcW82AsISOaSaMdEJAAEl7YkCJD7b47VzbLmBiypvpIXQHfOmun
pkdMR/KiTF8URW0KN6EH/nHo556CKHVNu9ADWhVgtH7EkpbyKhHisOYsefAxSsbJ
KnTQJ0WYNAKFDXH/BH/2kw==
)

2021-11-22T09:07:20+0100 48CooEkkSg [info] storage location exists
2021-11-22T09:07:22+0100 48CooEkkSg [info] end of downloadUpdate()
2021-11-22T09:07:22+0100 48CooEkkSg [info] endStep("4")
2021-11-22T09:07:22+0100 gi9JVNmH58 [info] request to updater
2021-11-22T09:07:22+0100 gi9JVNmH58 [info] currentStep()
2021-11-22T09:07:22+0100 gi9JVNmH58 [info] Step 4 is in state "end".
2021-11-22T09:07:22+0100 gi9JVNmH58 [info] POST request for step "5"
2021-11-22T09:07:22+0100 gi9JVNmH58 [info] startStep("5")
2021-11-22T09:07:22+0100 gi9JVNmH58 [info] verifyIntegrity()
2021-11-22T09:07:22+0100 gi9JVNmH58 [info] getUpdateServerResponse()
2021-11-22T09:07:22+0100 gi9JVNmH58 [info] updaterServer: https://updates.nextcloud.com/updater_server/
2021-11-22T09:07:22+0100 gi9JVNmH58 [info] releaseChannel: stable
2021-11-22T09:07:22+0100 gi9JVNmH58 [info] internal version: 20.0.14.2
2021-11-22T09:07:22+0100 gi9JVNmH58 [info] updateURL: https://updates.nextcloud.com/updater_server/?version=20x0x14x2xxxstablexx2021-11-11T15%3A12%3A13%2B00%3A00+50221f94abea4f26710091d94f2930a0322036bcx7x4x16
2021-11-22T09:07:23+0100 gi9JVNmH58 [info] getUpdateServerResponse response: Array
(
    [version] => 21.0.7.0
    [versionstring] => Nextcloud 21.0.7
    [url] => https://download.nextcloud.com/server/releases/nextcloud-21.0.7.zip
    [web] => https://docs.nextcloud.com/server/21/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=21.0.7
    [autoupdater] => 1
    [eol] => 0
    [signature] => X6XppxNBXwUCKDb6bl8i6a6doM4BMUDy9XI1fK2mQEfUU8MhqxDkGurgNdaXUadd
GZTyuv+okUiqrW+ujwPWZxADyAUT/hLtkDeNUHBEjGtPTZs9Kd+YbhllkotqDek0
73W0jM2qvXfAHaw+8luGzdpjbIdIwA0OmHL81Xy/6fDy0zJazesuGKnKZyUqwMsU
AvCKJj9NSSnQ9qcW82AsISOaSaMdEJAAEl7YkCJD7b47VzbLmBiypvpIXQHfOmun
pkdMR/KiTF8URW0KN6EH/nHo556CKHVNu9ADWhVgtH7EkpbyKhHisOYsefAxSsbJ
KnTQJ0WYNAKFDXH/BH/2kw==
)

2021-11-22T09:07:23+0100 gi9JVNmH58 [info] storage location: /mnt/HC_Volume_4932186/nextcloud_data/updater-oc6rdysuzom0/downloads/
2021-11-22T09:07:23+0100 gi9JVNmH58 [info] end of verifyIntegrity()
2021-11-22T09:07:23+0100 gi9JVNmH58 [info] endStep("5")
2021-11-22T09:07:23+0100 x0flxwfEOG [info] request to updater
2021-11-22T09:07:23+0100 x0flxwfEOG [info] currentStep()
2021-11-22T09:07:23+0100 x0flxwfEOG [info] Step 5 is in state "end".
2021-11-22T09:07:23+0100 x0flxwfEOG [info] POST request for step "6"
2021-11-22T09:07:23+0100 x0flxwfEOG [info] startStep("6")
2021-11-22T09:07:23+0100 x0flxwfEOG [info] extractDownload()
2021-11-22T09:07:23+0100 x0flxwfEOG [info] storage location: /mnt/HC_Volume_4932186/nextcloud_data/updater-oc6rdysuzom0/downloads/
2021-11-22T09:07:27+0100 x0flxwfEOG [info] end of extractDownload()
2021-11-22T09:07:27+0100 x0flxwfEOG [info] endStep("6")
2021-11-22T09:07:27+0100 G3CvpjOyrn [info] request to updater
2021-11-22T09:07:27+0100 G3CvpjOyrn [info] currentStep()
2021-11-22T09:07:27+0100 G3CvpjOyrn [info] Step 6 is in state "end".
2021-11-22T09:07:27+0100 G3CvpjOyrn [info] POST request for step "7"
2021-11-22T09:07:27+0100 G3CvpjOyrn [info] startStep("7")
2021-11-22T09:07:27+0100 G3CvpjOyrn [info] setMaintenanceMode("true")
2021-11-22T09:07:27+0100 G3CvpjOyrn [info] configFileName /var/www/html/nextcloud/updater/../config/config.php
2021-11-22T09:07:27+0100 G3CvpjOyrn [info] end of setMaintenanceMode()
2021-11-22T09:07:27+0100 G3CvpjOyrn [info] endStep("7")
2021-11-22T09:07:27+0100 grjSRUSVAd [info] request to updater
2021-11-22T09:07:27+0100 grjSRUSVAd [info] currentStep()
2021-11-22T09:07:27+0100 grjSRUSVAd [info] Step 7 is in state "end".
2021-11-22T09:07:27+0100 grjSRUSVAd [info] POST request for step "8"
2021-11-22T09:07:27+0100 grjSRUSVAd [info] startStep("8")
2021-11-22T09:07:27+0100 grjSRUSVAd [info] replaceEntryPoints()
2021-11-22T09:07:27+0100 grjSRUSVAd [info] replace index.php
2021-11-22T09:07:27+0100 grjSRUSVAd [info] replace status.php
2021-11-22T09:07:27+0100 grjSRUSVAd [info] replace remote.php
2021-11-22T09:07:27+0100 grjSRUSVAd [info] replace public.php
2021-11-22T09:07:27+0100 grjSRUSVAd [info] replace ocs/v1.php
2021-11-22T09:07:27+0100 grjSRUSVAd [info] replace ocs/v2.php
2021-11-22T09:07:27+0100 grjSRUSVAd [info] end of replaceEntryPoints()
2021-11-22T09:07:27+0100 grjSRUSVAd [info] endStep("8")
2021-11-22T09:07:27+0100 G8aeYpxtMJ [info] request to updater
2021-11-22T09:07:27+0100 G8aeYpxtMJ [info] currentStep()
2021-11-22T09:07:27+0100 G8aeYpxtMJ [info] Step 8 is in state "end".
2021-11-22T09:07:27+0100 G8aeYpxtMJ [info] POST request for step "9"
2021-11-22T09:07:27+0100 G8aeYpxtMJ [info] startStep("9")
2021-11-22T09:07:27+0100 G8aeYpxtMJ [info] deleteOldFiles()
2021-11-22T09:07:27+0100 G8aeYpxtMJ [info] config sample exists
2021-11-22T09:07:27+0100 G8aeYpxtMJ [info] themes README exists
2021-11-22T09:07:28+0100 G8aeYpxtMJ [info] end of deleteOldFiles()
2021-11-22T09:07:28+0100 G8aeYpxtMJ [info] endStep("9")
2021-11-22T09:07:28+0100 aQgF6w1xdF [info] request to updater
2021-11-22T09:07:28+0100 aQgF6w1xdF [info] currentStep()
2021-11-22T09:07:28+0100 aQgF6w1xdF [info] Step 9 is in state "end".
2021-11-22T09:07:28+0100 aQgF6w1xdF [info] POST request for step "10"
2021-11-22T09:07:28+0100 aQgF6w1xdF [info] startStep("10")
2021-11-22T09:07:28+0100 aQgF6w1xdF [info] moveNewVersionInPlace()
2021-11-22T09:07:28+0100 aQgF6w1xdF [info] storage location: /mnt/HC_Volume_4932186/nextcloud_data/updater-oc6rdysuzom0/downloads/nextcloud/
2021-11-22T09:07:30+0100 aQgF6w1xdF [info] end of moveNewVersionInPlace()
2021-11-22T09:07:30+0100 aQgF6w1xdF [info] endStep("10")
2021-11-22T09:07:33+0100 mNQYtL80yd [info] request to updater
2021-11-22T09:07:33+0100 mNQYtL80yd [info] currentStep()
2021-11-22T09:07:33+0100 mNQYtL80yd [info] Step 10 is in state "end".
2021-11-22T09:07:33+0100 mNQYtL80yd [info] POST request for step "11"
2021-11-22T09:07:33+0100 mNQYtL80yd [info] startStep("11")
2021-11-22T09:07:33+0100 mNQYtL80yd [info] setMaintenanceMode("false")
2021-11-22T09:07:33+0100 mNQYtL80yd [info] configFileName /var/www/html/nextcloud/updater/../config/config.php
2021-11-22T09:07:33+0100 mNQYtL80yd [info] end of setMaintenanceMode()
2021-11-22T09:07:33+0100 mNQYtL80yd [info] endStep("11")
2021-11-22T09:07:33+0100 LiJZTiYs0q [info] request to updater
2021-11-22T09:07:33+0100 LiJZTiYs0q [info] currentStep()
2021-11-22T09:07:33+0100 LiJZTiYs0q [info] Step 11 is in state "end".
2021-11-22T09:07:33+0100 LiJZTiYs0q [info] POST request for step "12"
2021-11-22T09:07:33+0100 LiJZTiYs0q [info] startStep("12")
2021-11-22T09:07:33+0100 LiJZTiYs0q [info] finalize()
2021-11-22T09:07:33+0100 LiJZTiYs0q [info] storage location: /mnt/HC_Volume_4932186/nextcloud_data/updater-oc6rdysuzom0/downloads/nextcloud/
2021-11-22T09:07:33+0100 LiJZTiYs0q [info] call opcache_reset()
2021-11-22T09:07:33+0100 LiJZTiYs0q [info] end of finalize()
2021-11-22T09:07:33+0100 LiJZTiYs0q [info] endStep("12")
2021-11-22T09:53:44+0100 Q2WJTbH053 [info] request to updater
2021-11-22T09:53:44+0100 Q2WJTbH053 [info] currentStep()
2021-11-22T09:53:44+0100 Q2WJTbH053 [info] Step 12 is in state "end".
2021-11-22T09:53:44+0100 Q2WJTbH053 [info] POST request for step "1"
2021-11-22T09:53:44+0100 Q2WJTbH053 [info] startStep("1")
2021-11-22T09:53:44+0100 Q2WJTbH053 [info] checkForExpectedFilesAndFolders()
2021-11-22T09:53:44+0100 Q2WJTbH053 [info] end of checkForExpectedFilesAndFolders()
2021-11-22T09:53:44+0100 Q2WJTbH053 [info] endStep("1")
2021-11-22T09:53:45+0100 VibQYCJvW6 [info] request to updater
2021-11-22T09:53:45+0100 VibQYCJvW6 [info] currentStep()
2021-11-22T09:53:45+0100 VibQYCJvW6 [info] Step 1 is in state "end".
2021-11-22T09:53:45+0100 VibQYCJvW6 [info] POST request for step "2"
2021-11-22T09:53:45+0100 VibQYCJvW6 [info] startStep("2")
2021-11-22T09:53:45+0100 VibQYCJvW6 [info] checkWritePermissions()
2021-11-22T09:53:45+0100 VibQYCJvW6 [info] end of checkWritePermissions()
2021-11-22T09:53:45+0100 VibQYCJvW6 [info] endStep("2")
2021-11-22T09:53:45+0100 B8NiJjCasK [info] request to updater
2021-11-22T09:53:45+0100 B8NiJjCasK [info] currentStep()
2021-11-22T09:53:45+0100 B8NiJjCasK [info] Step 2 is in state "end".
2021-11-22T09:53:45+0100 B8NiJjCasK [info] POST request for step "3"
2021-11-22T09:53:45+0100 B8NiJjCasK [info] startStep("3")
2021-11-22T09:53:45+0100 B8NiJjCasK [info] createBackup()
2021-11-22T09:53:45+0100 B8NiJjCasK [info] backup folder location: /mnt/HC_Volume_4932186/nextcloud_data/updater-oc6rdysuzom0/backups/nextcloud-20.0.14.2-1637571225/
2021-11-22T09:53:59+0100 B8NiJjCasK [info] end of createBackup()
2021-11-22T09:53:59+0100 B8NiJjCasK [info] endStep("3")
2021-11-22T09:53:59+0100 zE0snb7bwp [info] request to updater
2021-11-22T09:53:59+0100 zE0snb7bwp [info] currentStep()
2021-11-22T09:53:59+0100 zE0snb7bwp [info] Step 3 is in state "end".
2021-11-22T09:53:59+0100 zE0snb7bwp [info] POST request for step "4"
2021-11-22T09:53:59+0100 zE0snb7bwp [info] startStep("4")
2021-11-22T09:53:59+0100 zE0snb7bwp [info] downloadUpdate()
2021-11-22T09:53:59+0100 zE0snb7bwp [info] getUpdateServerResponse()
2021-11-22T09:53:59+0100 zE0snb7bwp [info] updaterServer: https://updates.nextcloud.com/updater_server/
2021-11-22T09:53:59+0100 zE0snb7bwp [info] releaseChannel: stable
2021-11-22T09:53:59+0100 zE0snb7bwp [info] internal version: 20.0.14.2
2021-11-22T09:53:59+0100 zE0snb7bwp [info] updateURL: https://updates.nextcloud.com/updater_server/?version=20x0x14x2xxxstablexx2021-11-15T20%3A07%3A50%2B00%3A00+80a804aa41853e9123bf69cfab66efd98bd07df4x7x4x16
2021-11-22T09:54:00+0100 zE0snb7bwp [info] getUpdateServerResponse response: Array
(
    [version] => 21.0.7.0
    [versionstring] => Nextcloud 21.0.7
    [url] => https://download.nextcloud.com/server/releases/nextcloud-21.0.7.zip
    [web] => https://docs.nextcloud.com/server/21/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=21.0.7
    [autoupdater] => 1
    [eol] => 0
    [signature] => X6XppxNBXwUCKDb6bl8i6a6doM4BMUDy9XI1fK2mQEfUU8MhqxDkGurgNdaXUadd
GZTyuv+okUiqrW+ujwPWZxADyAUT/hLtkDeNUHBEjGtPTZs9Kd+YbhllkotqDek0
73W0jM2qvXfAHaw+8luGzdpjbIdIwA0OmHL81Xy/6fDy0zJazesuGKnKZyUqwMsU
AvCKJj9NSSnQ9qcW82AsISOaSaMdEJAAEl7YkCJD7b47VzbLmBiypvpIXQHfOmun
pkdMR/KiTF8URW0KN6EH/nHo556CKHVNu9ADWhVgtH7EkpbyKhHisOYsefAxSsbJ
KnTQJ0WYNAKFDXH/BH/2kw==
)

2021-11-22T09:54:00+0100 zE0snb7bwp [info] storage location exists
2021-11-22T09:54:04+0100 zE0snb7bwp [info] end of downloadUpdate()
2021-11-22T09:54:04+0100 zE0snb7bwp [info] endStep("4")
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] request to updater
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] currentStep()
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] Step 4 is in state "end".
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] POST request for step "5"
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] startStep("5")
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] verifyIntegrity()
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] getUpdateServerResponse()
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] updaterServer: https://updates.nextcloud.com/updater_server/
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] releaseChannel: stable
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] internal version: 20.0.14.2
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] updateURL: https://updates.nextcloud.com/updater_server/?version=20x0x14x2xxxstablexx2021-11-15T20%3A07%3A50%2B00%3A00+80a804aa41853e9123bf69cfab66efd98bd07df4x7x4x16
2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] getUpdateServerResponse response: Array
(
    [version] => 21.0.7.0
    [versionstring] => Nextcloud 21.0.7
    [url] => https://download.nextcloud.com/server/releases/nextcloud-21.0.7.zip
    [web] => https://docs.nextcloud.com/server/21/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=21.0.7
    [autoupdater] => 1
    [eol] => 0
    [signature] => X6XppxNBXwUCKDb6bl8i6a6doM4BMUDy9XI1fK2mQEfUU8MhqxDkGurgNdaXUadd
GZTyuv+okUiqrW+ujwPWZxADyAUT/hLtkDeNUHBEjGtPTZs9Kd+YbhllkotqDek0
73W0jM2qvXfAHaw+8luGzdpjbIdIwA0OmHL81Xy/6fDy0zJazesuGKnKZyUqwMsU
AvCKJj9NSSnQ9qcW82AsISOaSaMdEJAAEl7YkCJD7b47VzbLmBiypvpIXQHfOmun
pkdMR/KiTF8URW0KN6EH/nHo556CKHVNu9ADWhVgtH7EkpbyKhHisOYsefAxSsbJ
KnTQJ0WYNAKFDXH/BH/2kw==
)

2021-11-22T09:54:04+0100 ehnkFtzHd5 [info] storage location: /mnt/HC_Volume_4932186/nextcloud_data/updater-oc6rdysuzom0/downloads/
2021-11-22T09:54:05+0100 ehnkFtzHd5 [info] end of verifyIntegrity()
2021-11-22T09:54:05+0100 ehnkFtzHd5 [info] endStep("5")
2021-11-22T09:54:05+0100 dhAikC5YMv [info] request to updater
2021-11-22T09:54:05+0100 dhAikC5YMv [info] currentStep()
2021-11-22T09:54:05+0100 dhAikC5YMv [info] Step 5 is in state "end".
2021-11-22T09:54:05+0100 dhAikC5YMv [info] POST request for step "6"
2021-11-22T09:54:05+0100 dhAikC5YMv [info] startStep("6")
2021-11-22T09:54:05+0100 dhAikC5YMv [info] extractDownload()
2021-11-22T09:54:05+0100 dhAikC5YMv [info] storage location: /mnt/HC_Volume_4932186/nextcloud_data/updater-oc6rdysuzom0/downloads/
2021-11-22T09:54:08+0100 dhAikC5YMv [info] end of extractDownload()
2021-11-22T09:54:08+0100 dhAikC5YMv [info] endStep("6")
2021-11-22T09:54:08+0100 cjyPIMt6Ss [info] request to updater
2021-11-22T09:54:08+0100 cjyPIMt6Ss [info] currentStep()
2021-11-22T09:54:08+0100 cjyPIMt6Ss [info] Step 6 is in state "end".
2021-11-22T09:54:08+0100 cjyPIMt6Ss [info] POST request for step "7"
2021-11-22T09:54:08+0100 cjyPIMt6Ss [info] startStep("7")
2021-11-22T09:54:08+0100 cjyPIMt6Ss [info] setMaintenanceMode("true")
2021-11-22T09:54:08+0100 cjyPIMt6Ss [info] configFileName /var/www/html/nextcloud/updater/../config/config.php
2021-11-22T09:54:08+0100 cjyPIMt6Ss [info] end of setMaintenanceMode()
2021-11-22T09:54:08+0100 cjyPIMt6Ss [info] endStep("7")
2021-11-22T09:54:08+0100 GzIFNES6BK [info] request to updater
2021-11-22T09:54:08+0100 GzIFNES6BK [info] currentStep()
2021-11-22T09:54:08+0100 GzIFNES6BK [info] Step 7 is in state "end".
2021-11-22T09:54:08+0100 GzIFNES6BK [info] POST request for step "8"
2021-11-22T09:54:09+0100 GzIFNES6BK [info] startStep("8")
2021-11-22T09:54:09+0100 GzIFNES6BK [info] replaceEntryPoints()
2021-11-22T09:54:09+0100 GzIFNES6BK [info] replace index.php
2021-11-22T09:54:09+0100 GzIFNES6BK [info] replace status.php
2021-11-22T09:54:09+0100 GzIFNES6BK [info] replace remote.php
2021-11-22T09:54:09+0100 GzIFNES6BK [info] replace public.php
2021-11-22T09:54:09+0100 GzIFNES6BK [info] replace ocs/v1.php
2021-11-22T09:54:09+0100 GzIFNES6BK [info] replace ocs/v2.php
2021-11-22T09:54:09+0100 GzIFNES6BK [info] end of replaceEntryPoints()
2021-11-22T09:54:09+0100 GzIFNES6BK [info] endStep("8")
2021-11-22T09:54:09+0100 Uv9u1wUCNb [info] request to updater
2021-11-22T09:54:09+0100 Uv9u1wUCNb [info] currentStep()
2021-11-22T09:54:09+0100 Uv9u1wUCNb [info] Step 8 is in state "end".
2021-11-22T09:54:09+0100 Uv9u1wUCNb [info] POST request for step "9"
2021-11-22T09:54:09+0100 Uv9u1wUCNb [info] startStep("9")
2021-11-22T09:54:09+0100 Uv9u1wUCNb [info] deleteOldFiles()
2021-11-22T09:54:09+0100 Uv9u1wUCNb [info] config sample exists
2021-11-22T09:54:09+0100 Uv9u1wUCNb [info] themes README exists
2021-11-22T09:54:09+0100 Uv9u1wUCNb [info] end of deleteOldFiles()
2021-11-22T09:54:09+0100 Uv9u1wUCNb [info] endStep("9")
2021-11-22T09:54:09+0100 E1kM5QnKV9 [info] request to updater
2021-11-22T09:54:09+0100 E1kM5QnKV9 [info] currentStep()
2021-11-22T09:54:09+0100 E1kM5QnKV9 [info] Step 9 is in state "end".
2021-11-22T09:54:09+0100 E1kM5QnKV9 [info] POST request for step "10"
2021-11-22T09:54:10+0100 E1kM5QnKV9 [info] startStep("10")
2021-11-22T09:54:10+0100 E1kM5QnKV9 [info] moveNewVersionInPlace()
2021-11-22T09:54:10+0100 E1kM5QnKV9 [info] storage location: /mnt/HC_Volume_4932186/nextcloud_data/updater-oc6rdysuzom0/downloads/nextcloud/
2021-11-22T09:54:12+0100 E1kM5QnKV9 [info] end of moveNewVersionInPlace()
2021-11-22T09:54:12+0100 E1kM5QnKV9 [info] endStep("10")
2021-11-22T09:54:14+0100 s5ci9ssRW3 [info] request to updater
2021-11-22T09:54:14+0100 s5ci9ssRW3 [info] currentStep()
2021-11-22T09:54:14+0100 s5ci9ssRW3 [info] Step 10 is in state "end".
2021-11-22T09:54:14+0100 s5ci9ssRW3 [info] POST request for step "11"
2021-11-22T09:54:14+0100 s5ci9ssRW3 [info] startStep("11")
2021-11-22T09:54:14+0100 s5ci9ssRW3 [info] setMaintenanceMode("false")
2021-11-22T09:54:14+0100 s5ci9ssRW3 [info] configFileName /var/www/html/nextcloud/updater/../config/config.php
2021-11-22T09:54:14+0100 s5ci9ssRW3 [info] end of setMaintenanceMode()
2021-11-22T09:54:14+0100 s5ci9ssRW3 [info] endStep("11")
2021-11-22T09:54:14+0100 1Q7d7aCYz7 [info] request to updater
2021-11-22T09:54:14+0100 1Q7d7aCYz7 [info] currentStep()
2021-11-22T09:54:14+0100 1Q7d7aCYz7 [info] Step 11 is in state "end".
2021-11-22T09:54:14+0100 1Q7d7aCYz7 [info] POST request for step "12"
2021-11-22T09:54:14+0100 1Q7d7aCYz7 [info] startStep("12")
2021-11-22T09:54:14+0100 1Q7d7aCYz7 [info] finalize()
2021-11-22T09:54:14+0100 1Q7d7aCYz7 [info] storage location: /mnt/HC_Volume_4932186/nextcloud_data/updater-oc6rdysuzom0/downloads/nextcloud/
2021-11-22T09:54:14+0100 1Q7d7aCYz7 [info] call opcache_reset()
2021-11-22T09:54:14+0100 1Q7d7aCYz7 [info] end of finalize()
2021-11-22T09:54:14+0100 1Q7d7aCYz7 [info] endStep("12")

Sorry i am not an MariaDB expert. But perhaps you can test some of this commands and post more logs. But the error differs from your error.

root@services:/var/www/html# systemctl status mariadb.service
● mariadb.service - MariaDB 10.1.47 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-11-22 09:57:04 CET; 4h 53min ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 3754 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 3748 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
  Process: 3630 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || ex
  Process: 3623 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 3611 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 3718 (mysqld)
   Status: "Taking your SQL requests now..."
    Tasks: 28 (limit: 4584)
   CGroup: /system.slice/mariadb.service
           └─3718 /usr/sbin/mysqld

Nov 22 09:57:03 services systemd[1]: Starting MariaDB 10.1.47 database server...
Nov 22 09:57:03 services mysqld[3718]: 2021-11-22  9:57:03 140690922753152 [Note] /usr/sbin/mysqld (mysqld 10.1.47-MariaDB-0ubuntu0.18.04.1) starting as process 3718 ...
Nov 22 09:57:04 services /etc/mysql/debian-start[3753]: Upgrading MySQL tables if necessary.
Nov 22 09:57:04 services /etc/mysql/debian-start[3757]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Nov 22 09:57:04 services /etc/mysql/debian-start[3757]: Looking for 'mysql' as: /usr/bin/mysql
Nov 22 09:57:04 services /etc/mysql/debian-start[3757]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Nov 22 09:57:04 services /etc/mysql/debian-start[3757]: This installation of MySQL is already upgraded to 10.1.47-MariaDB, use --force if you still need to run mysql_upgrade
Nov 22 09:57:04 services systemd[1]: Started MariaDB 10.1.47 database server.

root@services:/var/www/html# /etc/init.d/mysql start
[ ok ] Starting mysql (via systemctl): mysql.service.
root@services:/var/www/html# journalctl -xe
Journal file /var/log/journal/2dc00e7f874d46ba9ef9986904294ed2/user-1000.journal is truncated, ignoring file.
Nov 22 14:49:49 services sshd[8934]: Disconnected from invalid user ubnt 194.85.250.156 port 37758 [preauth]
Nov 22 14:50:01 services kernel: [UFW BLOCK] IN=eth0 OUT= MAC=96:00:00:4b:a3:2a:d2:74:7f:6e:37:e3:08:00 SRC=92.52.178.181 DST=94.130.175.29 LEN=40 TOS=0x00 PREC=0x00 TTL=243 ID=25391 DF PROTO=TCP SPT=32999 DPT=2
Nov 22 14:50:10 services kernel: [UFW BLOCK] IN=eth0 OUT= MAC=96:00:00:4b:a3:2a:d2:74:7f:6e:37:e3:08:00 SRC=185.191.34.204 DST=94.130.175.29 LEN=40 TOS=0x00 PREC=0x00 TTL=243 ID=60660 PROTO=TCP SPT=54686 DPT=886
Nov 22 14:50:17 services sshd[8944]: Invalid user admin from 42.248.77.136 port 56090
Nov 22 14:50:17 services sshd[8944]: pam_unix(sshd:auth): check pass; user unknown
Nov 22 14:50:17 services sshd[8944]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=42.248.77.136
Nov 22 14:50:20 services sshd[8944]: Failed password for invalid user admin from 42.248.77.136 port 56090 ssh2
Nov 22 14:50:20 services sshd[8944]: Received disconnect from 42.248.77.136 port 56090:11: Bye Bye [preauth]
Nov 22 14:50:20 services sshd[8944]: Disconnected from invalid user admin 42.248.77.136 port 56090 [preauth]
Nov 22 14:50:33 services sshd[9019]: Invalid user ubnt from 194.85.250.156 port 49050
Nov 22 14:50:33 services sshd[9019]: pam_unix(sshd:auth): check pass; user unknown
Nov 22 14:50:33 services sshd[9019]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=194.85.250.156
Nov 22 14:50:35 services sshd[9019]: Failed password for invalid user ubnt from 194.85.250.156 port 49050 ssh2
Nov 22 14:50:35 services sshd[9019]: Received disconnect from 194.85.250.156 port 49050:11: Normal Shutdown, Thank you for playing [preauth]
Nov 22 14:50:35 services sshd[9019]: Disconnected from invalid user ubnt 194.85.250.156 port 49050 [preauth]
Nov 22 14:50:46 services kernel: [UFW BLOCK] IN=eth0 OUT= MAC=96:00:00:4b:a3:2a:d2:74:7f:6e:37:e3:08:00 SRC=20.119.213.231 DST=94.130.175.29 LEN=40 TOS=0x00 PREC=0x00 TTL=234 ID=1187 PROTO=TCP SPT=1792 DPT=56690
Nov 22 14:50:56 services systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has begun starting up.
Nov 22 14:50:56 services kernel: [UFW BLOCK] IN=eth0 OUT= MAC=96:00:00:4b:a3:2a:d2:74:7f:6e:37:e3:08:00 SRC=167.248.133.80 DST=94.130.175.29 LEN=44 TOS=0x00 PREC=0x00 TTL=36 ID=43728 PROTO=TCP SPT=2880 DPT=9309
Nov 22 14:50:56 services mysql[9174]:  * Starting MariaDB database server mysqld
Nov 22 14:50:56 services mysql[9174]:    ...done.
Nov 22 14:50:56 services systemd[1]: Started LSB: Start and stop the mysql database server daemon.
-- Subject: Unit mysql.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has finished starting up.
--
-- The start-up result is RESULT.
Nov 22 14:51:01 services sshd[9285]: Received disconnect from 167.99.39.128 port 54704:11: Bye Bye [preauth]
Nov 22 14:51:01 services sshd[9285]: Disconnected from 167.99.39.128 port 54704 [preauth]
Nov 22 14:51:08 services kernel: [UFW BLOCK] IN=eth0 OUT= MAC=96:00:00:4b:a3:2a:d2:74:7f:6e:37:e3:08:00 SRC=79.124.62.86 DST=94.130.175.29 LEN=40 TOS=0x00 PREC=0x00 TTL=245 ID=9420 PROTO=TCP SPT=55314 DPT=65444
Nov 22 14:51:13 services sshd[9353]: Did not receive identification string from 141.98.10.63 port 45384
Nov 22 14:51:19 services sshd[9392]: Invalid user ubnt from 194.85.250.156 port 60448
Nov 22 14:51:19 services sshd[9392]: pam_unix(sshd:auth): check pass; user unknown
Nov 22 14:51:19 services sshd[9392]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=194.85.250.156
Nov 22 14:51:21 services sshd[9384]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=42.248.77.136  user=root
Nov 22 14:51:21 services sshd[9392]: Failed password for invalid user ubnt from 194.85.250.156 port 60448 ssh2
Nov 22 14:51:21 services sshd[9392]: Received disconnect from 194.85.250.156 port 60448:11: Normal Shutdown, Thank you for playing [preauth]
Nov 22 14:51:21 services sshd[9392]: Disconnected from invalid user ubnt 194.85.250.156 port 60448 [preauth]
Nov 22 14:51:23 services sshd[9384]: Failed password for root from 42.248.77.136 port 33609 ssh2
Nov 22 14:51:23 services sshd[9384]: Received disconnect from 42.248.77.136 port 33609:11: Bye Bye [preauth]
Nov 22 14:51:23 services sshd[9384]: Disconnected from authenticating user root 42.248.77.136 port 33609 [preauth]
Nov 22 14:51:32 services kernel: [UFW BLOCK] IN=eth0 OUT= MAC=96:00:00:4b:a3:2a:d2:74:7f:6e:37:e3:08:00 SRC=45.61.184.81 DST=94.130.175.29 LEN=44 TOS=0x00 PREC=0x00 TTL=243 ID=21316 PROTO=TCP SPT=48677 DPT=5921
Nov 22 14:51:40 services sshd[9524]: Invalid user user from 141.98.10.63 port 53532
Nov 22 14:51:40 services sshd[9524]: pam_unix(sshd:auth): check pass; user unknown
Nov 22 14:51:40 services sshd[9524]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=141.98.10.63
Nov 22 14:51:42 services sshd[9524]: Failed password for invalid user user from 141.98.10.63 port 53532 ssh2
Nov 22 14:51:42 services sshd[9524]: Connection closed by invalid user user 141.98.10.63 port 53532 [preauth]
Nov 22 14:51:48 services kernel: [UFW BLOCK] IN=eth0 OUT= MAC=96:00:00:4b:a3:2a:d2:74:7f:6e:37:e3:08:00 SRC=79.124.62.114 DST=94.130.175.29 LEN=40 TOS=0x00 PREC=0x00 TTL=245 ID=30064 PROTO=TCP SPT=8080 DPT=4453
Nov 22 14:52:11 services sshd[9716]: Invalid user ubnt from 194.85.250.156 port 46904
Nov 22 14:52:11 services sshd[9716]: pam_unix(sshd:auth): check pass; user unknown
Nov 22 14:52:11 services sshd[9716]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=194.85.250.156
Nov 22 14:52:12 services kernel: [UFW BLOCK] IN=eth0 OUT= MAC=96:00:00:4b:a3:2a:d2:74:7f:6e:37:e3:08:00 SRC=45.61.184.81 DST=94.130.175.29 LEN=44 TOS=0x00 PREC=0x00 TTL=243 ID=45830 PROTO=TCP SPT=48677 DPT=5933
Nov 22 14:52:13 services sshd[9716]: Failed password for invalid user ubnt from 194.85.250.156 port 46904 ssh2
Nov 22 14:52:13 services sshd[9716]: Received disconnect from 194.85.250.156 port 46904:11: Normal Shutdown, Thank you for playing [preauth]
Nov 22 14:52:13 services sshd[9716]: Disconnected from invalid user ubnt 194.85.250.156 port 46904 [preauth]
lines 1013-1073/1073 (END)
root@services:/var/www/html#  mysqld --help --verbose | grep 'log-error' | tail -1
2021-11-22 14:51:32 140117444299904 [ERROR] Plugin 'QUERY_RESPONSE_TIME' already installed
2021-11-22 14:51:32 140117444299904 [ERROR] Plugin 'QUERY_RESPONSE_TIME_AUDIT' already installed
2021-11-22 14:51:32 140117444299904 [Note] Plugin 'FEEDBACK' is disabled.
log-error                                                  /var/log/mysql/error.log
root@services:/var/www/html# cat /var/log/mysql/error.log
2021-11-22  9:51:54 139856510852224 [ERROR] Plugin 'QUERY_RESPONSE_TIME' already installed
2021-11-22  9:51:54 139856510852224 [ERROR] Plugin 'QUERY_RESPONSE_TIME_AUDIT' already installed
2021-11-22  9:51:54 139856510852224 [ERROR] mysqld: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds
2021-11-22  9:52:26 139856510852224 [ERROR] mysqld: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2021-11-22  9:52:26 139856510852224 [ERROR] Plugin 'Aria' init function returned error.
2021-11-22  9:52:26 139856510852224 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2021-11-22  9:52:26 139856510852224 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2021-11-22  9:52:26 139856510852224 [Note] InnoDB: The InnoDB memory heap is disabled
2021-11-22  9:52:26 139856510852224 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-11-22  9:52:26 139856510852224 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2021-11-22  9:52:26 139856510852224 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-11-22  9:52:26 139856510852224 [Note] InnoDB: Using Linux native AIO
2021-11-22  9:52:26 139856510852224 [Note] InnoDB: Using SSE crc32 instructions
2021-11-22  9:52:26 139856510852224 [Note] InnoDB: Initializing buffer pool, size = 1.0G
2021-11-22  9:52:26 139856510852224 [Note] InnoDB: Completed initialization of buffer pool
2021-11-22  9:52:26 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:26 139856510852224 [Note] InnoDB: Retrying to lock the first data file
2021-11-22  9:52:27 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:28 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:29 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:30 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:31 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:32 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:33 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:34 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:35 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:36 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:37 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:38 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:39 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:40 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:41 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:42 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:43 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:44 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:45 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:46 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:47 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:48 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:49 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:50 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:51 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:52 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:53 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:54 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:55 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:56 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:57 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:58 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:52:59 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:53:00 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:53:01 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:53:02 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:53:03 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:53:04 139856510852224 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2021-11-22  9:53:05 139856510852224 [Note] InnoDB: Highest supported file format is Barracuda.
2021-11-22  9:53:05 139856510852224 [Note] InnoDB: Read redo log up to LSN=2171337728
2021-11-22  9:53:05 139856510852224 [Note] InnoDB: 128 rollback segment(s) are active.
2021-11-22  9:53:05 139856510852224 [Note] InnoDB: Waiting for purge to start
2021-11-22  9:53:05 139856510852224 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.49-89.0 started; log sequence number 2171272331
2021-11-22  9:53:05 139856510852224 [Note] Plugin 'FEEDBACK' is disabled.
2021-11-22  9:53:05 139856510852224 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb_read_only_compressed=OFF'
2021-11-22  9:53:05 139856510852224 [ERROR] Aborting

2021-11-22  9:56:04 139817193127040 [ERROR] Plugin 'QUERY_RESPONSE_TIME' already installed
2021-11-22  9:56:04 139817193127040 [ERROR] Plugin 'QUERY_RESPONSE_TIME_AUDIT' already installed
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: The InnoDB memory heap is disabled
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: Using Linux native AIO
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: Using SSE crc32 instructions
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: Initializing buffer pool, size = 1.0G
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: Completed initialization of buffer pool
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: Highest supported file format is Barracuda.
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: 128 rollback segment(s) are active.
2021-11-22  9:56:05 139817193127040 [Note] InnoDB: Waiting for purge to start
2021-11-22  9:56:05 139817193127040 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.49-89.0 started; log sequence number 2171272351
2021-11-22  9:56:05 139815517386496 [Note] InnoDB: Dumping buffer pool(s) not yet started
2021-11-22  9:56:05 139817193127040 [Note] Plugin 'FEEDBACK' is disabled.
2021-11-22  9:56:05 139817193127040 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb_read_only_compressed=OFF'
2021-11-22  9:56:05 139817193127040 [ERROR] Aborting

2021-11-22  9:57:03 140690922753152 [ERROR] Plugin 'QUERY_RESPONSE_TIME' already installed
2021-11-22  9:57:03 140690922753152 [ERROR] Plugin 'QUERY_RESPONSE_TIME_AUDIT' already installed
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: The InnoDB memory heap is disabled
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: Using Linux native AIO
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: Using SSE crc32 instructions
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: Initializing buffer pool, size = 1.0G
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: Completed initialization of buffer pool
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: Highest supported file format is Barracuda.
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: 128 rollback segment(s) are active.
2021-11-22  9:57:03 140690922753152 [Note] InnoDB: Waiting for purge to start
2021-11-22  9:57:03 140690922753152 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.49-89.0 started; log sequence number 2171272361
2021-11-22  9:57:03 140690922753152 [Note] Plugin 'FEEDBACK' is disabled.
2021-11-22  9:57:03 140689249629952 [Note] InnoDB: Dumping buffer pool(s) not yet started
2021-11-22  9:57:03 140690922753152 [Note] Server socket created on IP: '127.0.0.1'.
2021-11-22  9:57:03 140690922753152 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.47-MariaDB-0ubuntu0.18.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Ubuntu 18.04

Sorry. But i think MariaDB was startet at 09:57:03.

Post
netstat -an |grep 3306

Maria db starts but the nextcloud update fails. If i add the innodb_read_only_compressed=OFF to config line it dont’ start.

tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN

Sorry. But can you post new logs.

How do you start the update? Post the command line and the errors after that.
E.g.
sudo -u www-data php updater/updater.phar

I tested both via web gui and via php occ both with same error.
With

root@services:/var/www/html/nextcloud# sudo -u www-data php updater/updater.phar
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 21.0.7.

Update to Nextcloud 21.0.7 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-21.0.7.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 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
2021-11-23T12:44:50+00:00 Setting log level to debug
2021-11-23T12:44:50+00:00 Turned on maintenance mode
2021-11-23T12:44:50+00:00 Repair step: Repair MySQL collation
2021-11-23T12:44:50+00:00 Repair info: All tables already have the correct collation -> nothing to do
2021-11-23T12:44:50+00:00 Repair step: Repair SQLite autoincrement
2021-11-23T12:44:50+00:00 Repair step: Copy data from accounts table when migrating from ownCloud
2021-11-23T12:44:50+00:00 Repair step: Drop account terms table when migrating from ownCloud
2021-11-23T12:44:50+00:00 Updating database schema
2021-11-23T12:44:51+00:00 Exception: Database error when running migration latest for app core
2021-11-23T12:44:51+00:00 Update failed
2021-11-23T12:44:51+00:00 Maintenance mode is kept active
2021-11-23T12:44:51+00:00 Resetting log level

Keep maintenance mode active? [y/N] N
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
Maintenance mode disabled

Maintenance mode is disabled

Then i have the gui asking for update i start the update and I have the error:

Aggiorna a 21.0.7

Exception: Database error when running migration latest for app core

Log dettagliati

Preparazione dell’aggiornamento

Imposta il livello del log per il debug

Modalità di manutenzione attivata

Fase di riparazione: Repair MySQL collation

Informazioni di riparazione: All tables already have the correct collation → nothing to do

Fase di riparazione: Repair SQLite autoincrement

Fase di riparazione: Copy data from accounts table when migrating from ownCloud

Fase di riparazione: Drop account terms table when migrating from ownCloud

Aggiornamento schema database

Exception: Database error when running migration latest for app core

L’aggiornamento non è riuscito. Segnala il problema alla comunità di Nextcloud .

You can search this line in the internet for the error. But there are much possibilitys.

Have you manually installed nextcloud apps?
Perhaps they are not supported.
If possible uninstall manual installed nextcloud apps not really needed.

No app were installed manully, only from the panel.
But the error states nextcloud OR one othe apps require upgrade and still think the problem is in
Exception: Database error when running migration latest for app core

I try to update the apps but there is the nexcloud upgrade pending and the app upgrade is not possible. The nextcloud upgrade ends with database error so i’m stuck…

root@services:/var/www/html/nextcloud# sudo -u www-data php occ app:update --all
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

root@services:/var/www/html/nextcloud# sudo -u www-data php occ app:list
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
Enabled:
  - accessibility: 1.6.0
  - activity: 2.13.4
  - admin_audit: 1.10.0
  - bruteforcesettings: 2.2.0
  - calendar: 2.3.4
  - cloud_federation_api: 1.3.0
  - cms_pico: 1.0.16
  - comments: 1.10.0
  - contacts: 4.0.6
  - contactsinteraction: 1.1.0
  - dashboard: 7.0.0
  - dav: 1.16.2
  - encryption: 2.8.1
  - federatedfilesharing: 1.10.2
  - federation: 1.10.1
  - files: 1.15.0
  - files_external: 1.11.1
  - files_pdfviewer: 2.0.2
  - files_rightclick: 0.17.0
  - files_sharing: 1.12.2
  - files_trashbin: 1.10.1
  - files_versions: 1.13.0
  - files_videoplayer: 1.9.0
  - firstrunwizard: 2.9.0
  - logreader: 2.5.0
  - lookup_server_connector: 1.8.0
  - nextcloud_announcements: 1.9.0
  - notifications: 2.8.0
  - oauth2: 1.8.0
  - password_policy: 1.10.1
  - photos: 1.2.3
  - privacy: 1.4.0
  - provisioning_api: 1.10.0
  - recommendations: 0.8.0
  - serverinfo: 1.10.0
  - settings: 1.2.0
  - sharebymail: 1.10.0
  - spreed: 10.0.10
  - support: 1.3.0
  - survey_client: 1.8.0
  - systemtags: 1.10.0
  - text: 3.1.0
  - theming: 1.11.0
  - twofactor_backupcodes: 1.9.0
  - updatenotification: 1.10.0
  - user_status: 1.0.1
  - user_usage_report: 1.4.2
  - viewer: 1.4.0
  - weather_status: 1.0.0
  - workflowengine: 2.2.1
Disabled:
  - mail
  - user_ldap

You can use occ for different command corresponding to apps e.g.

sudo -u www-data php occ app:list

Perhaps you can/must disable or uninstall apps:

app
 app:install      install selected app
 app:disable      disable an app
 app:enable       enable an app
 app:getpath      get an absolute path to the app directory
 app:list         list all available apps
 app:update       update an app or all apps
 app:remove       disable and remove an app

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#apps-commands

I will try to diasable the apps but still belive the problem is at database level during upgrade as i’m not the only one having this issue.

Some apps can’t even be disabled

root@services:/var/www/html/nextcloud# sudo -u www-data php occ app:disable cloud_federation_api dav federatedfilesharing files lookup_server_connector oauth2 provisioning_api settings twofactor_backupcodes viewer workflowengine
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
cloud_federation_api can't be disabled.
dav can't be disabled.
federatedfilesharing can't be disabled.
files can't be disabled.
lookup_server_connector can't be disabled.
oauth2 can't be disabled.
provisioning_api can't be disabled.
settings can't be disabled.
twofactor_backupcodes can't be disabled.
viewer can't be disabled.
workflowengine can't be disabled.

And of couse the problem is still there

root@services:/var/www/html/nextcloud# sudo -u www-data 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
Updating database schema
Exception: Database error when running migration latest for app core
Update failed
Maintenance mode is kept active
Resetting log level

I think i will give up with next cloud, the times i had update Issues have been too many frankly speaking the update of nextcloud had become too thrilling.
My instance stop working and never started again.
Opening a thread here and a bug on github did not get anyware.

perhaps can you try to reinstall a new database and make it awailable for nextcloud.

Then you make an upgrade of your database to reoraganise all files.

sudo -u www-data php console.php files:scan --all

expecting it helps.

good luck.

I gave up with nextcloud frankly speaking the amount of “upgrade problem” topics in the forum is rising at a worring rate and personally I already faced upgrade problems at least 3 o 4 times.
I’m not a professional and i prefer to invest my time in other matters rather than chasing upgrade issue of a small nextcloud setup (nothing special, plain ubuntu LTS no unsupported plugins) that should be 99% safe and tested on each update.