Hi all!
About a week ago I got an alert about NC17.0.1 was available for me.
A few hours ago I started an upgrade on my current NC 16.0.6-installation, only to fail utterly.
I had some database problems a while ago, but that was resolved after installing MariaDB and changing tables etc to utf8mb4 as per the documentation. Has been working quite nicely since then.
Anyway, the upgrade failed, I got this:
Updating <files_trashbin> …
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘CREATE INDEX id_index ON oc_files_trash (id
)’:
SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.
Update failed
Any ideas what might’ve failed and why the files_trashbin app seems to have problems?
As can be see from the phpmyadmin pic-dump mb4 is used there too.
What gives? Hints appreciated as well as any for resolving this.
Thanks.
From nextcloug.log:
{“reqId”:“YSMyYEh22g614URCj3Ba”,“level”:4,“time”:“2019-11-17T12:25:10+00:00”,“remoteAddr”:“”,“user”:“–”,“app”:“core”,“method”:“”,“url”:“–”,“message”:“Failed to update database structure (PDOException: SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. in /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:88\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(88): PDO->query(‘CREATE INDEX id…’)\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1010): Doctrine\DBAL\Driver\PDOConnection->query(‘CREATE INDEX id…’)\n#2 /var/www/html/nextcloud/lib/private/DB/Migrator.php(260): Doctrine\DBAL\Connection->query(‘CREATE INDEX id…’)\n#3 /var/www/html/nextcloud/lib/private/DB/Migrator.php(83): OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema))\n#4 /var/www/html/nextcloud/lib/private/DB/MDB2SchemaManager.php(123): OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema))\n#5 /var/www/html/nextcloud/lib/private/legacy/db.php(188): OC\DB\MDB2SchemaManager->updateDbFromStructure(‘/var/www/html/n…’)\n#6 /var/www/html/nextcloud/lib/private/legacy/app.php(903): OC_DB::updateDbFromStructure(‘/var/www/html/n…’)\n#7 /var/www/html/nextcloud/lib/private/Updater.php(373): OC_App::updateApp(‘files_trashbin’)\n#8 /var/www/html/nextcloud/lib/private/Updater.php(252): OC\Updater->doAppUpgrade()\n#9 /var/www/html/nextcloud/lib/private/Updater.php(128): OC\Updater->doUpgrade(‘17.0.1.1’, ‘16.0.6.1’)\n#10 /var/www/html/nextcloud/core/Command/Upgrade.php(258): OC\Updater->upgrade()\n#11 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#12 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(908): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#13 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(269): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#14 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#15 /var/www/html/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#16 /var/www/html/nextcloud/console.php(97): OC\Console\Application->run()\n#17 /var/www/html/nextcloud/occ(11): require_once(‘/var/www/html/n…’)\n#18 {main}\n\nNext Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. in /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:90\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1010): Doctrine\DBAL\Driver\PDOConnection->query(‘CREATE INDEX id…’)\n#1 /var/www/html/nextcloud/lib/private/DB/Migrator.php(260): Doctrine\DBAL\Connection->query(‘CREATE INDEX id…’)\n#2 /var/www/html/nextcloud/lib/private/DB/Migrator.php(83): OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema))\n#3 /var/www/html/nextcloud/lib/private/DB/MDB2SchemaManager.php(123): OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema))\n#4 /var/www/html/nextcloud/lib/private/legacy/db.php(188): OC\DB\MDB2SchemaManager->updateDbFromStructure(‘/var/www/html/n…’)\n#5 /var/www/html/nextcloud/lib/private/legacy/app.php(903): OC_DB::updateDbFromStructure(‘/var/www/html/n…’)\n#6 /var/www/html/nextcloud/lib/private/Updater.php(373): OC_App::updateApp(‘files_trashbin’)\n#7 /var/www/html/nextcloud/lib/private/Updater.php(252): OC\Updater->doAppUpgrade()\n#8 /var/www/html/nextcloud/lib/private/Updater.php(128): OC\Updater->doUpgrade(‘17.0.1.1’, ‘16.0.6.1’)\n#9 /var/www/html/nextcloud/core/Command/Upgrade.php(258): OC\Updater->upgrade()\n#10 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#11 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(908): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#12 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(269): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#13 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#14 /var/www/html/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#15 /var/www/html/nextcloud/console.php(97): OC\Console\Application->run()\n#16 /var/www/html/nextcloud/occ(11): require_once(‘/var/www/html/n…’)\n#17 {main}\n\nNext Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘CREATE INDEX id_index ON oc_files_trash (
id
)’:\n\nSQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. in /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:106\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(169): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException(‘An exception oc…’, Object(Doctrine\DBAL\Driver\PDOException))\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(145): Doctrine\DBAL\DBALException::wrapException(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), ‘An exception oc…’)\n#2 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1012): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), ‘CREATE INDEX id…’)\n#3 /var/www/html/nextcloud/lib/private/DB/Migrator.php(260): Doctrine\DBAL\Connection->query(‘CREATE INDEX id…’)\n#4 /var/www/html/nextcloud/lib/private/DB/Migrator.php(83): OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema))\n#5 /var/www/html/nextcloud/lib/private/DB/MDB2SchemaManager.php(123): OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema))\n#6 /var/www/html/nextcloud/lib/private/legacy/db.php(188): OC\DB\MDB2SchemaManager->updateDbFromStructure(‘/var/www/html/n…’)\n#7 /var/www/html/nextcloud/lib/private/legacy/app.php(903): OC_DB::updateDbFromStructure(‘/var/www/html/n…’)\n#8 /var/www/html/nextcloud/lib/private/Updater.php(373): OC_App::updateApp(‘files_trashbin’)\n#9 /var/www/html/nextcloud/lib/private/Updater.php(252): OC\Updater->doAppUpgrade()\n#10 /var/www/html/nextcloud/lib/private/Updater.php(128): OC\Updater->doUpgrade(‘17.0.1.1’, ‘16.0.6.1’)\n#11 /var/www/html/nextcloud/core/Command/Upgrade.php(258): OC\Updater->upgrade()\n#12 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#13 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(908): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#14 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(269): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#15 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#16 /var/www/html/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#17 /var/www/html/nextcloud/console.php(97): OC\Console\Application->run()\n#18 /var/www/html/nextcloud/occ(11): require_once(‘/var/www/html/n…’)\n#19 {main})”,“userAgent”:“–”,“version”:“16.0.6.1”}
[details=“Support intro”]
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 82320
Server version: 5.5.66-MariaDB MariaDB Server
root@cyndane2:~ # php -v
PHP 7.3.11 (cli) (built: Oct 22 2019 12:34:50) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.11, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.8.0, Copyright (c) 2002-2019, by Derick Rethans
root@cyndane2:/var/www/html # httpd -v
Server version: Apache/2.2.15 (Unix)
Server built: Jun 19 2018 15:45:13
root@cyndane2:/var/www/html # cat /etc/centos-release
CentOS release 6.10 (Final)
Nextcloud 16.0.6
root@cyndane2:/var/www/html/nextcloud # sudo -u apache php occ config:list system
{
“system”: {
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“srbu.se”,
“www.srbu.se”,
“192.168.0.8”
],
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“overwrite.cli.url”: “http://localhost”,
“dbtype”: “mysql”,
“version”: “16.0.6.1”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“logtimezone”: “UTC”,
“installed”: true,
“instanceid”: “REMOVED SENSITIVE VALUE”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_smtpmode”: “sendmail”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“maintenance”: false,
“theme”: “”,
“loglevel”: 2,
“filelocking.enabled”: true,
“memcache.local”: “\OC\Memcache\APCu”,
“memcache.locking”: “\OC\Memcache\APCu”,
“trashbin_retention_obligation”: “15, 20”,
“enable_previews”: true,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “587”,
“auth.bruteforce.protection.enabled”: false,
“mail_sendmailmode”: “smtp”,
“mail_smtpdebug”: true,
“mail_smtpauthtype”: “LOGIN”,
“mail_smtpsecure”: “ssl”,
“mail_smtpauth”: 1,
“mysql.utf8mb4”: true,
“twofactor_enforced”: “false”,
“twofactor_enforced_groups”: ,
“twofactor_enforced_excluded_groups”: ,
“app_install_overwrite”: [
“activitylog”,
“impersonate”
]
}
}
root@cyndane2:/var/www/html/nextcloud #
root@cyndane2:/var/www/html/nextcloud # sudo -u apache php occ app:list
Enabled:
- activity: 2.9.1
- admin_audit: 1.6.0
- cloud_federation_api: 0.2.0
- dav: 1.9.2
- federatedfilesharing: 1.6.0
- files: 1.11.0
- files_pdfviewer: 1.5.0
- files_rightclick: 0.15.1
- files_sharing: 1.8.0
- files_texteditor: 2.8.0
- files_trashbin: 1.6.0
- files_versions: 1.9.0
- files_videoplayer: 1.5.0
- gallery: 18.3.0
- impersonate: 1.3.0
- lookup_server_connector: 1.4.0
- nextcloud_announcements: 1.5.0
- notifications: 2.4.1
- oauth2: 1.4.2
- privacy: 1.0.0
- provisioning_api: 1.6.0
- serverinfo: 1.6.0
- text: 1.0.2
- twofactor_backupcodes: 1.5.0
- updatenotification: 1.6.0
- workflowengine: 1.6.0
Disabled: - accessibility
- comments
- encryption
- federation
- files_external
- firstrunwizard
- logreader
- password_policy
- recommendations
- sharebymail
- support
- survey_client
- systemtags
- theming
- user_ldap
- viewer
root@cyndane2:/var/www/html/nextcloud #
root@cyndane2:/var/www/html/nextcloud # sudo -u apache php occ maintenance:repair
- Repair MySQL collation
- All tables already have the correct collation → nothing to do
- Repair mime types
- Clean tags and favorites
- 0 tags of deleted users have been removed.
- 0 tags for delete files have been removed.
- 0 tag entries for deleted tags have been removed.
- 0 tags with no entries have been removed.
- Repair invalid shares
- Remove shares of a users root folder
- Move .step file of updater to backup location
- .step file exists
- .step-previous-update removed
- .step file moved to .step-previous-update
- Fix potential broken mount points
- No mounts updated
- Repair invalid paths in file cache
- Add log rotate job
- Clear frontend caches
- Image cache cleared
- SCSS cache cleared
- JS cache cleared
- Clear every generated avatar on major updates
- Add preview background cleanup job
- Queue a one-time job to cleanup old backups of the updater
- Repair pending cron jobs
- No need to repair pending cron jobs.
- Extract the vcard uid and store it in the db
- Cleanup invalid photocache files for carddav
- Add background job to cleanup login flow v2 tokens
- Remove potentially over exposing share links
- No need to remove link shares.
- Clear access cache of projects
- Cleanup cypress files from viewer app
- Fix component of birthday calendars
- 0 birthday calendars updated.
- Regenerating birthday calendars to use new icons and fix old birthday events without year
- Repair step already executed
- Fix broken values of calendar objects
0 [>---------------------------] - Registering building of calendar search index as background job
- Repair step already executed
- Registering background jobs to update cache for webcal calendars
- Added 0 background jobs to update webcal calendars
- Clean up orphan event and contact data
- 0 events without a calendar have been cleaned up
- 0 properties without an events have been cleaned up
- 0 changes without a calendar have been cleaned up
- 0 cached events without a calendar subscription have been cleaned up
- 0 changes without a calendar subscription have been cleaned up
- 0 contacts without an addressbook have been cleaned up
- 0 properties without a contact have been cleaned up
- 0 changes without an addressbook have been cleaned up
- Remove activity entries of private events
- Removed 0 activity entries
- Fix the share type of guest shares when migrating from ownCloud
- Copy the share password into the dedicated column
- Update OAuth token expiration times
- Add background job to check for backup codes
root@cyndane2:/var/www/html/nextcloud #