Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from 12.0.0 to 12.0.1 #6039

Closed
hubertkn opened this issue Aug 8, 2017 · 17 comments
Closed

Update from 12.0.0 to 12.0.1 #6039

hubertkn opened this issue Aug 8, 2017 · 17 comments

Comments

@hubertkn
Copy link

hubertkn commented Aug 8, 2017

Steps to reproduce

  1. Updating from version 12.0.0 to 12.0.1
  2. Start update in browser

Expected behaviour

Successful update to 12.0.1

Actual behaviour

The updating process stop, the following message apprears:

Updating database schema
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE nc11_admin_sections CHANGE class class VARCHAR(255) DEFAULT '' NOT NULL': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

Some of tables I have convert manually by the command:

ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
ALTER TABLE table_name CHANGE column_name column_name VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin

The varchar of 191 is passing and I have applied it to "nc11_admin_sections CHANGE class", then I have refreshed the nextcloud page in browser but the updating process crashed with the above message.

Server configuration

Operating system:
Linux webm342.xxl.ha.ovh.net 4.4.67-ovh-vps-grsec-zfs-classid #1 SMP Thu May 11 18:47:35 CEST 2017 x86_64

Web server:
OVH

Database:
MYSQL v.5.5

PHP version:
PHP Version 5.6.31

Nextcloud version: (see Nextcloud admin page)

Updated from an older Nextcloud/ownCloud or fresh install:
update from 12.0.0 to 12.0.1

Where did you install Nextcloud from:
11.0.3

Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:

App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

Config report

'trusted_domains' =>
'datadirectory' => '',
'overwrite.cli.url' => '
',
'dbtype' => 'mysql',
'mysql.utf8mb4' => true,
'version' => '12.0.0.29',
'dbname' => '',
'dbhost' => '
',
'dbport' => '',
'dbtableprefix' => 'nc11_',
'dbuser' => '',
'dbpassword' => '
',
'logtimezone' => 'UTC',
'installed' => true,
'defaultapp' => 'apporder',
'maintenance' => false,
'debug' => false,
'theme' => '',
'loglevel' => 2,
'app.mail.imaplog.enabled' => false,
'app.mail.smtplog.enabled' => false,
'updater.release.channel' => 'stable',
'mail_from_address' => '',
'mail_smtpmode' => 'php',
'mail_domain' => '
',
'mail_smtpsecure' => 'ssl',
'mail_smtpauth' => 1,
'mail_smtphost' => 'ssl0.ovh.net',
'mail_smtpport' => '465',
'mail_smtpname' => '',
'mail_smtppassword' => '
',
'mail_smtpauthtype' => '',
'updater.secret' => '
',

Are you using external storage, if yes which one: local/smb/sftp/...
dropbox

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser: Firefox

Operating system: Windows 7

Logs

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log

{"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":3,"time":"2017-08-08T18:52:33+00:00","remoteAddr":"77.65.85.153","user":"--","app":"no app in context","method":"GET","url":"/core/ajax/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"Exception: {"Exception":"Doctrine\\DBAL\\Exception\\DriverException","Message":"An exception occurred while executing 'ALTER TABLE nc11_systemtag_group CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;':\n\nSQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes","Code":0,"Trace":"#0 \/home\/SERVER\/www\/SERVER\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php(128): Doctrine\\DBAL\\Driver\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\DBAL\\Driver\\PDOException))\n#1 \/home\/SERVER\/www\/SERVER\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Statement.php(178): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\PDOMySql\\Driver), Object(Doctrine\\DBAL\\Driver\\PDOException), 'ALTER TABLE nc...', Array)\\n#2 \\\/home\\\/SERVER\\\/www\\\/SERVER\\\/lib\\\/private\\\/Repair\\\/Collation.php(98): Doctrine\\\\DBAL\\\\Statement->execute()\\n#3 \\\/home\\\/SERVER\\\/www\\\/SERVER\\\/lib\\\/private\\\/Repair.php(87): OC\\\\Repair\\\\Collation->run(Object(OC\\\\Repair))\\n#4 \\\/home\\\/SERVER\\\/www\\\/SERVER\\\/lib\\\/private\\\/Updater.php(249): OC\\\\Repair->run()\\n#5 \\\/home\\\/SERVER\\\/www\\\/SERVER\\\/lib\\\/private\\\/Updater.php(130): OC\\\\Updater->doUpgrade('12.0.1.5', '12.0.0.29')\\n#6 \\\/home\\\/SERVER\\\/www\\\/SERVER\\\/core\\\/ajax\\\/update.php(206): OC\\\\Updater->upgrade()\\n#7 {main}\",\"File\":\"\\\/home\\\/SERVER\\\/www\\\/SERVER\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":116}","userAgent":"Mozilla\/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko\/20100101 Firefox\/54.0","version":"12.0.0.29"} {"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":1,"time":"2017-08-08T18:52:33+00:00","remoteAddr":"77.65.85.153","user":"--","app":"updater","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"\\OC\\Repair::info: Repair info: Change row format for nc11_trusted_servers ...","userAgent":"Mozilla\/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko\/20100101 Firefox\/54.0","version":"12.0.0.29"} {"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":1,"time":"2017-08-08T18:52:34+00:00","remoteAddr":"77.65.85.153","user":"--","app":"updater","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"\\OC\\Repair::info: Repair info: Change collation for nc11_trusted_servers ...","userAgent":"Mozilla\/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko\/20100101 Firefox\/54.0","version":"12.0.0.29"} {"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":3,"time":"2017-08-08T18:52:34+00:00","remoteAddr":"77.65.85.153","user":"--","app":"no app in context","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'ALTER TABLE nc11_trusted_serversCONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;':\\n\\nSQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/SERVER\\\/www\\\/SERVER\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/home\\\/SERVER\\\/www\\\/SERVER\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Statement.php(178): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'ALTER TABLEnc...', Array)\n#2 \/home\/SERVER\/www\/SERVER\/lib\/private\/Repair\/Collation.php(98): Doctrine\\DBAL\\Statement->execute()\n#3 \/home\/SERVER\/www\/SERVER\/lib\/private\/Repair.php(87): OC\\Repair\\Collation->run(Object(OC\\Repair))\n#4 \/home\/SERVER\/www\/SERVER\/lib\/private\/Updater.php(249): OC\\Repair->run()\n#5 \/home\/SERVER\/www\/SERVER\/lib\/private\/Updater.php(130): OC\\Updater->doUpgrade('12.0.1.5', '12.0.0.29')\n#6 \/home\/SERVER\/www\/SERVER\/core\/ajax\/update.php(206): OC\\Updater->upgrade()\n#7 {main}","File":"\/home\/SERVER\/www\/SERVER\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractMySQLDriver.php","Line":116}","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","version":"12.0.0.29"}
{"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":1,"time":"2017-08-08T18:52:34+00:00","remoteAddr":"77.65.85.153","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"\OC\Repair::step: Repair step: Repair SQLite autoincrement","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","version":"12.0.0.29"}
{"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":1,"time":"2017-08-08T18:52:34+00:00","remoteAddr":"77.65.85.153","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"\OC\Repair::step: Repair step: Copy data from accounts table when migrating from ownCloud","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","version":"12.0.0.29"}
{"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":1,"time":"2017-08-08T18:52:34+00:00","remoteAddr":"77.65.85.153","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"\OC\Repair::step: Repair step: Drop account terms table when migrating from ownCloud","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","version":"12.0.0.29"}
{"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":1,"time":"2017-08-08T18:52:34+00:00","remoteAddr":"77.65.85.153","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"\OC\Updater::dbUpgradeBefore: Updating database schema","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","version":"12.0.0.29"}
{"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":4,"time":"2017-08-08T18:52:39+00:00","remoteAddr":"77.65.85.153","user":"--","app":"core","method":"GET","url":"/core/ajax/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"Failed to update database structure (exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes' in /home/SERVER/www/SERVER/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104\nStack trace:\n#0 /home/SERVER/www/SERVER/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(104): PDO->query('ALTER TABLE nc1...')\n#1 /home/SERVER/www/SERVER/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(954): Doctrine\DBAL\Driver\PDOConnection->query('ALTER TABLE nc1...')\n#2 /home/SERVER/www/SERVER/lib/private/DB/Migrator.php(258): Doctrine\DBAL\Connection->query('ALTER TABLE nc1...')\n#3 /home/SERVER/www/SERVER/lib/private/DB/Migrator.php(86): OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema))\n#4 /home/SERVER/www/SERVER/lib/private/DB/MDB2SchemaManager.php(122): OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema))\n#5 /home/SERVER/www/SERVER/lib/private/legacy/db.php(186): OC\DB\MDB2SchemaManager->updateDbFromStructure('/home/SERVER/www...')\n#6 /home/SERVER/www/SERVER/lib/private/Updater.php(302): OC_DB::updateDbFromStructure('/home/SERVER/www...')\n#7 /home/SERVER/www/SERVER/lib/private/Updater.php(251): OC\Updater->doCoreUpgrade()\n#8 /home/SERVER/www/SERVER/lib/private/Updater.php(130): OC\Updater->doUpgrade('12.0.1.5', '12.0.0.29')\n#9 /home/SERVER/www/SERVER/core/ajax/update.php(206): OC\Updater->upgrade()\n#10 {main}\n\nNext exception 'Doctrine\DBAL\Driver\PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes' in /home/SERVER/www/SERVER/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106\nStack trace:\n#0 /home/SERVER/www/SERVER/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(954): Doctrine\DBAL\Driver\PDOConnection->query('ALTER TABLE nc1...')\n#1 /home/SERVER/www/SERVER/lib/private/DB/Migrator.php(258): Doctrine\DBAL\Connection->query('ALTER TABLE nc1...')\n#2 /home/SERVER/www/SERVER/lib/private/DB/Migrator.php(86): OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema))\n#3 /home/SERVER/www/SERVER/lib/private/DB/MDB2SchemaManager.php(122): OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema))\n#4 /home/SERVER/www/SERVER/lib/private/legacy/db.php(186): OC\DB\MDB2SchemaManager->updateDbFromStructure('/home/SERVER/www...')\n#5 /home/SERVER/www/SERVER/lib/private/Updater.php(302): OC_DB::updateDbFromStructure('/home/SERVER/www...')\n#6 /home/SERVER/www/SERVER/lib/private/Updater.php(251): OC\Updater->doCoreUpgrade()\n#7 /home/SERVER/www/SERVER/lib/private/Updater.php(130): OC\Updater->doUpgrade('12.0.1.5', '12.0.0.29')\n#8 /home/SERVER/www/SERVER/core/ajax/update.php(206): OC\Updater->upgrade()\n#9 {main}\n\nNext exception 'Doctrine\DBAL\Exception\DriverException' with message 'An exception occurred while executing 'ALTER TABLE nc11_admin_sections CHANGE class class VARCHAR(255) DEFAULT '' NOT NULL':\n\nSQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes' in /home/SERVER/www/SERVER/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:116\nStack trace:\n#0 /home/SERVER/www/SERVER/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(128): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))\n#1 /home/SERVER/www/SERVER/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(964): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'ALTER TABLE nc1...')\n#2 /home/SERVER/www/SERVER/lib/private/DB/Migrator.php(258): Doctrine\DBAL\Connection->query('ALTER TABLE nc1...')\n#3 /home/SERVER/www/SERVER/lib/private/DB/Migrator.php(86): OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema))\n#4 /home/SERVER/www/SERVER/lib/private/DB/MDB2SchemaManager.php(122): OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema))\n#5 /home/SERVER/www/SERVER/lib/private/legacy/db.php(186): OC\DB\MDB2SchemaManager->updateDbFromStructure('/home/SERVER/www...')\n#6 /home/SERVER/www/SERVER/lib/private/Updater.php(302): OC_DB::updateDbFromStructure('/home/SERVER/www...')\n#7 /home/SERVER/www/SERVER/lib/private/Updater.php(251): OC\Updater->doCoreUpgrade()\n#8 /home/SERVER/www/SERVER/lib/private/Updater.php(130): OC\Updater->doUpgrade('12.0.1.5', '12.0.0.29')\n#9 /home/SERVER/www/SERVER/core/ajax/update.php(206): OC\Updater->upgrade()\n#10 {main})","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","version":"12.0.0.29"}
{"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":3,"time":"2017-08-08T18:52:39+00:00","remoteAddr":"77.65.85.153","user":"--","app":"core","method":"GET","url":"/core/ajax/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"Exception: {"Exception":"Doctrine\\DBAL\\Exception\\DriverException","Message":"An exception occurred while executing 'ALTER TABLE nc11_admin_sections CHANGE class class VARCHAR(255) DEFAULT '' NOT NULL':\n\nSQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes","Code":0,"Trace":"#0 \/home\/SERVER\/www\/SERVER\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php(128): Doctrine\\DBAL\\Driver\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\DBAL\\Driver\\PDOException))\n#1 \/home\/SERVER\/www\/SERVER\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(964): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\PDOMySql\\Driver), Object(Doctrine\\DBAL\\Driver\\PDOException), 'ALTER TABLE nc1...')\n#2 \/home\/SERVER\/www\/SERVER\/lib\/private\/DB\/Migrator.php(258): Doctrine\\DBAL\\Connection->query('ALTER TABLE nc1...')\n#3 \/home\/SERVER\/www\/SERVER\/lib\/private\/DB\/Migrator.php(86): OC\\DB\\Migrator->applySchema(Object(Doctrine\\DBAL\\Schema\\Schema))\n#4 \/home\/SERVER\/www\/SERVER\/lib\/private\/DB\/MDB2SchemaManager.php(122): OC\\DB\\Migrator->migrate(Object(Doctrine\\DBAL\\Schema\\Schema))\n#5 \/home\/SERVER\/www\/SERVER\/lib\/private\/legacy\/db.php(186): OC\\DB\\MDB2SchemaManager->updateDbFromStructure('\/home\/SERVER\/www...')\n#6 \/home\/SERVER\/www\/SERVER\/lib\/private\/Updater.php(302): OC_DB::updateDbFromStructure('\/home\/SERVER\/www...')\n#7 \/home\/SERVER\/www\/SERVER\/lib\/private\/Updater.php(251): OC\\Updater->doCoreUpgrade()\n#8 \/home\/SERVER\/www\/SERVER\/lib\/private\/Updater.php(130): OC\\Updater->doUpgrade('12.0.1.5', '12.0.0.29')\n#9 \/home\/SERVER\/www\/SERVER\/core\/ajax\/update.php(206): OC\\Updater->upgrade()\n#10 {main}","File":"\/home\/SERVER\/www\/SERVER\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractMySQLDriver.php","Line":116}","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","version":"12.0.0.29"}
{"reqId":"WYohIbwoAPY4AAAxVqfEAAABC","level":3,"time":"2017-08-08T18:52:39+00:00","remoteAddr":"77.65.85.153","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"\OC\Updater::failure: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE nc11_admin_sections CHANGE class class VARCHAR(255) DEFAULT '' NOT NULL':\n\nSQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","version":"12.0.0.29"}
{"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":3,"time":"2017-08-08T18:52:39+00:00","remoteAddr":"77.65.85.153","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"\OC\Updater::updateEnd: Update failed","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","version":"12.0.0.29"}
{"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":1,"time":"2017-08-08T18:52:39+00:00","remoteAddr":"77.65.85.153","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"\OC\Updater::maintenanceActive: Maintenance mode is kept active","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","version":"12.0.0.29"}
{"reqId":"WYoIbwoAPY4AAAxVqfEAAABC","level":1,"time":"2017-08-08T18:52:39+00:00","remoteAddr":"77.65.85.153","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=N7J%2F68ltlltydzjHi8Y7X1Tu4CrDXpP87d%2Fofuxhrz0%3D%3Abuo1gYFfp2gGQEKr5KB%2BbD%2FYrX6BFsOapbWaF9pZnQU%3D","message":"\OC\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","version":"12.0.0.29"}

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@hubertkn
Copy link
Author

hubertkn commented Aug 8, 2017

Ok, I have passed updating process. I modified db_structure.xml file in nextcloud path. I have changed each problematic varchar form 255 to 191. Beside, I have manually modified rest of problematic table columns in phpMyAdmin.

Now I have 'code integrity' issue, but it is not a problem since I know that I changed those files :)

`
Results

  • core
    • INVALID_HASH
      • db_structure.xml
  • tasks
    • INVALID_HASH
      • appinfo/app.php
        Raw output
        `

@MorrisJobke
Copy link
Member

cc @nickvergessen

@nickvergessen
Copy link
Member

@hubertkn did you enable mysql 4byte support?

@nickvergessen
Copy link
Member

nickvergessen commented Aug 9, 2017

Also, do you happen to know which version of MySQL 5.5 you are running?

@graesslich
Copy link

I got the same error: My Database is utfmb4, but Doctrine defaults to utf8.
Solution was to change "utf8" to "utfmb4" in
- 3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
- 3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php
- 3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php

and run the updater again.

(I would like to keep it like that, but now this files fail the integrity check.)

@nickvergessen
Copy link
Member

Well you don't need to do those modifications, if you follow https://docs.nextcloud.com/server/11/admin_manual/maintenance/mysql_4byte_support.html

What's your MySQL version?

@graesslich
Copy link

Hallo nickvergessen,
it is Ver 15.1 Distrib 10.0.30-MariaDB for Debian.
I already tried the first part of this manual when I changed the charset to utfmb4, but I didn't dare apply the "even more experimental" MariaDB support.

@hubertkn
Copy link
Author

hubertkn commented Aug 9, 2017

Hi All,

@nickvergessen

my MySQL version info:

innodb_version 5.5.55
protocol_version 10
slave_type_conversions  
version 5.5.55-0+deb7u1-log
version_comment (Debian)
version_compile_machine x86_64
version_compile_os debian-linux-gnu

I don't have access to mysql configuration file, I have to ask my server provider.

@rrrnld
Copy link

rrrnld commented Aug 10, 2017

I was facing the same issue, see #6062. My mariadb version string is mysql Ver 15.1 Distrib 10.0.31-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2. After adding utf8mb4 support as described here (including the steps described in the "even more experimental" MariaDB section), I could proceed with the update without problems, thanks!

@johnnydvc
Copy link

Same error here.
Even after the modifications

[Doctrine\DBAL\Exception\DriverException]
An exception occurred while executing 'ALTER TABLE oc_addressbooks CONVERT TO CHARACTER
SET utf8mb4 COLLATE utf8mb4_bin;':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max ke
y length is 767 bytes

@hubertkn
Copy link
Author

My server provider has informed me that the database supports utf8mb4, but until now, he has not confimed that it is configured acc. to https://docs.nextcloud.com/server/11/admin_manual/maintenance/mysql_4byte_support.html

@hubertkn
Copy link
Author

I have gotten answer from my server provider about database configuration:

innodb_large_prefix is OFF.

innodb_file_format=barracuda => not barracuda.

innodb_file_per_table=1 => it's ok.

@Nibbels
Copy link

Nibbels commented Aug 27, 2017

thanks hubertkn!

I had the same problem. I know I should change file format to barracuda, but I am not able to rightnow. So I am stuck with half-MB4 somehow ^^.
nextcloud/documentation#513

To get rid of the news apps error not to have utf8mb4 active I did upgrade to this 4-byte-DB 'in some unconventional way'. Then the problems started.

For fixing the active app update I took your hint and changed db_structure.xml
For fixing the file integrity error I changed it back to original state after this apps upgrade went through without failing.

This state of having to backchange the db_structure.xml on every tiny update is not what I want. But for now it fixed my system.

@hubertkn
Copy link
Author

Hi All,
updating from 12.0.1 to 12.0.3 the same problem and the same solution...

best regards,
Hubert

@MorrisJobke MorrisJobke removed this from the Nextcloud 12.0.5 milestone Jan 9, 2018
@MorrisJobke
Copy link
Member

I have gotten answer from my server provider about database configuration:

innodb_large_prefix is OFF.

innodb_file_format=barracuda => not barracuda.

innodb_file_per_table=1 => it's ok.

this needs to be fixed first: https://docs.nextcloud.com/server/13/admin_manual/configuration_database/mysql_4byte_support.html

Nothing we can do here.

@MorrisJobke
Copy link
Member

For fixing the file integrity error I changed it back to original state after this apps upgrade went through without failing.

This state of having to backchange the db_structure.xml on every tiny update is not what I want. But for now it fixed my system.

Keep in mind: by doing so we can't guarantee that all works as it should. So this is own your risk.

@MorrisJobke
Copy link
Member

We haven't noticed this for a while and also got no feedback on this ticket regarding my last comment. Let's close this for now and look at it once this happens again without the manual change of the DB structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants