Failed upgrade 16.0.3 to 16.0.4

Support intro

Dear all,

In dire need of some support. Just returned from vacation, and ran the upgrade that appeared in my “production” channel…

Result is a fail, and it’s not making much sense to me. Not sure where to fiddle to get through this one… somewhere in the database I suppose…
Thanks in advance for your great support.

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 16.0.3):
Operating system and version (eg, Ubuntu 17.04): Raspbian Linux 9.9 Stretch
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.25 (Raspbian)
PHP version (eg, 7.1): PHP 7.3.7-2+0~20190725.42+debian9~1.gbp848ca5 (cli)

The issue you are facing:

Dear all,

In dire need of some support. Just returned from vacation, and ran the upgrade that appeared in my “production” channel…

Result is a fail, and it’s not making much sense to me. Not sure where to fiddle to get through this one… somewhere in the database I suppose…
Thanks in advance for your great support.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Open NC web updater
  2. Update NC 16.0.3 to 16.0.4
  3. Fail

The output of your Nextcloud log in Admin > Logging:

Unavail

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

<?php
$CONFIG = array (
  'instanceid' => '###',
  'passwordsalt' => '###',
  'secret' => '###',
  'trusted_domains' => 
  array (
    0 => '###',
    1 => '###',
    2 => '###',
  ),
  'datadirectory' => '/###',
  'dbtype' => 'mysql',
  'version' => '16.0.3.0',
  'overwrite.cli.url' => 'https://###',
  'dbname' => '###',
  'dbhost' => '###',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '###',
  'dbpassword' => '###',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'logtimezone' => 'Europe/Paris',
  'log_type' => 'owncloud',
  'logfile' => '/var/log/nextcloud.log',
  'loglevel' => 2,
  'enable_previews' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'updater.release.channel' => 'production',
  'mysql.utf8mb4' => true,
  'default_language' => 'en',
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    6 => 'OC\\Preview\\PDF',
    8 => 'OC\\Preview\\TXT',
  ),
  'preview_max_x' => 1080,
  'preview_max_y' => 1920,
  'updater.secret' => '###',
);


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

PASTE HERE

Hi efftee,

It looks like your previous utf8mb4 conversion didn’t go as planned. Have a look at the following link and follow these steps to fix the error in your screenshot.

https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/mysql_4byte_support.html

Thank you very much. Will try this right away.
(Feels like I had ran through this before though, following some minor warnings… )

Strange, it seems I’m back in Antelope mode, pretty sure I had previously switched to Barracuda… hmmm

Could it be that you did not set it global? That’s why I added mine in the /etc/mysql/my.cnf as fix parameters, so it can’t change back even during an update as the config would be ignored to being modified. At least you found the error and hopefully got your NC working again.

1 Like

Hi
Thanks for this additionnal tip. Will also check this point.
I’m not done operating the changes (it’s a large db and I lacked the time yesterday), currently in the process.
So no NC is still not up and running.
I will certainly “mark you as solution” when my instance is back online :wink: !

Damnit…
While running the instructions you provided
(https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/mysql_4byte_support.html)

After correctly running all other steps including the Mariadb part of manual update to Barracuda for every table, all with no errors, I’m still STUCK at the last point 6 of the mysql part
( Convert all existing tables to the new collation by running the repair step:
$ sudo -u www-data php occ maintenance:repair)

It returns this awful answer :

This should not happen, if you followed the instruction in the provided link?! That is very odd…

Can you run the following commands in your mysql console, to make sure the required parameters are set?

Commands:

SHOW VARIABLES LIKE 'innodb_file_%';

Should come up with:

+-----------------------+-----------+
| Variable_name         | Value     |
+-----------------------+-----------+
| innodb_file_format    | barracuda |
| innodb_file_per_table | ON        |
+-----------------------+-----------+
SHOW VARIABLES LIKE 'innodb_large_%';

Should come up with:

+---------------------+-------+
| Variable_name       | Value |
+---------------------+-------+
| innodb_large_prefix | true  |
+---------------------+-------+

If that’s not the case, I would set them manually in the /etc/mysql/my.cnf and restart the MySQL server afterwards and try the repair command again.

Many people had that pain after NC deciced to make the utf8mb4 mandatory, despite not everyone using Emojis or anything similar which would require the utf8mb4.

1 Like

Hi,

YES.

I (thanks to you) finally nailed it.
You were correct, my /etc/mysql/my.cnf was not properly set.
After double check, and update of the file, the rest of the process succeeded, and my NC is now back into business in version 16.0.4.

I agree with your remark about not necessarily needing emojis, which is my case.
I do understand however it is difficult to predict to never encounter it, and I therefore understand the logic of making it supported by default…

Thank you ever so much.
You’ve saved my return from vacation, that was about to turn ugly with a failed server …

:+1::+1::+1::+1::+1::+1::+1:

1 Like