Mail-app: Fehler bei update-Versuch

1. Message when going to NC:

App-Aktualisierung notwendig

Diese Apps werden aktualisiert:

  • Mail (mail)

Stellen Sie vor dem Fortsetzen bitte sicher, dass die Datenbank, der Konfigurationsordner und der Datenordner gesichert wurden.

Zur Vermeidung von ZeitĂŒberschreitungen bei grĂ¶ĂŸeren Installationen können Sie stattdessen den folgenden Befehl in Ihrem Installationsverzeichnis ausfĂŒhren:

./occ upgrade

2. when system is trying to update the mail-app, another Alert-Box occurs:

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘ALTER TABLE oc_mail_mailboxes DROP sync_token’: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

Detaillierte Protokollmeldungen

Update vorbereiten

Log-Level auf “debug” gesetzt

Wartungsmodus eingeschaltet

Reparaturschritt: Repair MySQL collation

Reparaturinformation: All tables already have the correct collation -> nothing to do

Reparaturschritt: Repair SQLite autoincrement

Reparaturschritt: Copy data from accounts table when migrating from ownCloud

Reparaturschritt: Drop account terms table when migrating from ownCloud

Das Datenbankschema wird aktualisiert

Datenbank aktualisiert

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘ALTER TABLE oc_mail_mailboxes DROP sync_token’: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

Das Update ist fehlgeschlagen. Bitte melden Sie dieses Problem an die Nextcloud Community.

1 Like

um welche version gehts?
welche softwares sind im einsatz?
wie hast du deine instanz gehostet?
hast du backups?
gibt es fehlermeldungen in deinem admin-setup-verwaltungs-ĂŒbersichtsmenĂŒ?

schau mal hier
 vielleicht helfen dir die dort gefundenen lösungen


Hi welche mariadb Version nutzt du ?
Ich setze aktuell Version 10.1.44 ein und hatte exakt den gleichen Fehler.
Die Lösung bei mir war, dass ich vergessen hatte in

/etc/mysql/mariadb.conf.d/50-server.cnf

folgende Werte zu setzen.

[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=1

danach einmal

sudo systemctl restart mariadb

und anschließend

sudo -u www-data php occ upgrade

Und zack lief bei mir alles problemlos durch :slight_smile:

1 Like

Danke fĂŒr die Hilfe.
Leider hat’s nichts gebracht:

meine /etc/mysql/mariadb.conf.d/50-server.cnf nach Vorschlag angepasst:

* InnoDB

InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.

Read the manual for more InnoDB related options. There are many!

innodb_buffer_pool_size=1G
innodb_io_capacity=4000
i

* InnoDB

InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.

Read the manual for more InnoDB related options. There are many!

innodb_buffer_pool_size=1G
innodb_io_capacity=4000
innodb_file_per_table=1
innodb_large_prefix=true
innodeb_file_format=barracudannodb_file_per_table=1
innodb_large_prefix=true
innodeb_file_format=barracuda

root@Nas1:/var/www/html/nextcloud# systemctl restart mariadb
Job for mariadb.service failed because the control process exited with error code.
See “systemctl status mariadb.service” and “journalctl -xe” for details.
root@Nas1:/var/www/html/nextcloud#

mariadb startet nicht mehr!

root@Nas1:/etc/mysql/mariadb.conf.d# systemctl restart mariadb
Job for mariadb.service failed because the control process exited with error code.
See “systemctl status mariadb.service” and “journalctl -xe” for details.

der “Status”:

root@Nas1:/var/www/html/nextcloud# systemctl status mariadb.service
● mariadb.service - MariaDB 10.1.44 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-04-15 21:17:13 CEST; 2min 7s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 21642 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 21636 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
Process: 22476 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 22370 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=/usr/bin/galera_recovery; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 22361 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 22350 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 22476 (code=exited, status=1/FAILURE)
Status: “MariaDB server is down”

Apr 15 21:17:13 Nas1 systemd[1]: Starting MariaDB 10.1.44 database server

Apr 15 21:17:13 Nas1 mysqld[22476]: 2020-04-15 21:17:13 140036070681728 [ERROR] /usr/sbin/mysqld: ambiguous option ‘–i’ (init-rpl-role, ignore_db_dirs)
Apr 15 21:17:13 Nas1 mysqld[22476]: 2020-04-15 21:17:13 140036070681728 [ERROR] Aborting
Apr 15 21:17:13 Nas1 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Apr 15 21:17:13 Nas1 systemd[1]: mariadb.service: Failed with result ‘exit-code’.
Apr 15 21:17:13 Nas1 systemd[1]: Failed to start MariaDB 10.1.44 database server.
root@Nas1:/var/www/html/nextcloud#

wenn ich die Zeilen rausnehme, ist zumindest die mariadb wieder zu starten.

root@Nas1:/var/www/html/nextcloud# mysql --version
mysql Ver 15.1 Distrib 10.1.44-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
root@Nas1:/var/www/html/nextcloud#

Hi, hatte den gleichen Fehler beim Update der Mail App auf 1.3.2. in
Nextcloud 18.0.3.
Habe die gleiche MariaDB Version.
Vielen Dank, deine Tipps haben mein Problem behoben.

Vielleicht sollte man ergÀnzen, das root vor dem letzten Schritt mit cd /var/www/nextcloud erstmal ins richtige Verzeichnis wechseln muss. Sonst wird occ nicht gefunden.

Hi,
PrĂŒf doch nochmal deine innodb EintrĂ€ge.
Ich glaub, da haben sich ein paar Tippfehler eingeschlichen.

innodb_large_prefix=true
innodeb_file_format=barracudannodb_file_per_table=1
innodb_large_prefix=true
innodeb_file_format=barracuda

Am besten Zeile fĂŒr Zeile von Slomo kopieren


Herzlichen Dank
an “Netter_Nachbar” , “Slomo_Official” und “JimmyKater”!
Der Tippfehler war der Schuft, und ich der Esel.

Jetzt klappt es.

1 Like

Hi@all,

for me this steps were NOT WORKING.
I had to set ‘mysql.utf8mb4’ => true, to FALSE
in my config.php

after that, the mail app update was successfull without any error. Then I was able to set it back to true again, and all was working after restarting the apache service.

Nextcloud 18.0.2
Regards, Freak

This is not a fix. You just made the app insert with a possibly invalid encoding. Please read and follow https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/mysql_4byte_support.html

Hi,

this is all well documented at https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/mysql_4byte_support.html. Fix your database for proper utf-8 support and the update will run smooth.

Cheers

I used it just as workaround. Not as a fix. But in my opinion, I also configured all of the document. Maybe theres an Error. The Nextcloud Installation doesn’t show me any error or warnings

Yeah, Nextcloud can only detect some of the incorrect setups. There aren’t checks for everything.

Hallo zusammen,

ich habe dasselbe Problem mit meiner Nextcloud Instanz. Wenn ich in error log nachschaue steht folgendes:

May 18 19:06:10 2020] [php7:error] [pid 1004] [client 2001:16b8:2d85:8400:b4bf:94f5:bdfb:b6ee] [host filescloud.amitie-solidarite.org] PHP Fatal error: Declaration of OC\Files\Storage\Local::copyFromStorage(OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) must be compatible with OC\Files\Storage\Common::copyFromStorage(OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) in /is/htdocs/wp12496787_P4FN8J74JR/www/filescloud/lib/private/Files/Storage/Local.php on line 43

Kann jemand mir behilfich sein? Danke im Voraus