Nextcloud version: 19.0.1
Operating system and version: CentOS 7
Apache version: httpd 2.4.34-18
PHP version: 7.3
MariaDB version: 5.5.65
This morning I updated from NC 18.0.7 (everything working, no warnings reported) to NC 19.0.1. Once I upgraded I had to add some missing indexes, but this fails with an error:
# sudo -u apache -- scl enable rh-php73 -- php /var/www/nextcloud/occ db:add-missing-indices
Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Adding properties_path_index index to the oc_properties table, this can take some time...
In AbstractMySQLDriver.php line 106:
An exception occurred while executing 'CREATE INDEX properties_path_index ON oc_properties (userid, propertypath)':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
In PDOConnection.php line 90:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
In PDOConnection.php line 88:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
db:add-missing-indices
I have no idea how to solve this. I googled a bit and most hits are referring to the utf8mb4 conversion which I did correctly to my best understanding. NC 18 didn’t complain about it and I set the mysql.utf8mb4 to true. File format is barracuda.
I tried a repair and it runs successfully
# sudo -u apache -- scl enable rh-php73 -- php /var/www/nextcloud/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
- Move .step file of updater to backup location
- Fix potential broken mount points
- No mounts updated
- 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
- 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
- Reset generated avatar flag
- Fix component of birthday calendars
- 6 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
- Registering building of calendar reminder index as background job
- Repair step already executed
- 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
- Set existing shares as accepted
- Clean up meta table
- Update OAuth token expiration times
- Create help command
- Invalidate access cache for projects conversation provider
- Invalidation not required
- Switches from default updater server to the customer one if a valid subscription is available
- Repair step already executed
- Add background job to check for backup codes
- Insert UUIDFix background job for user and group in batches
- Populating added database structures for workflows
# echo $?
0
config.php
<?php
$CONFIG = array (
'instanceid' => '<edited>',
'passwordsalt' => '<edited>',
'datadirectory' => '<edited>',
'dbtype' => 'mysql',
'version' => '19.0.1.1',
'dbname' => 'owncloud',
'dbhost' => 'localhost',
'dbtableprefix' => 'oc_',
'dbuser' => 'owncloud',
'dbpassword' => '<edited>',
'installed' => true,
'ldapIgnoreNamingRules' => false,
'overwriteprotocol' => 'https',
'maintenance' => false,
'theme' => '',
'log_type' => 'owncloud',
'logfile' => '<edited>/logs/nextcloud.log',
'loglevel' => 1,
'trusted_domains' =>
array (
0 => '<my own domain>',
),
'trusted_proxies' =>
array (
0 => '<edited>',
1 => '<edited>',
),
'share_folder' => '/Shared',
'overwritewebroot' => '/nextcloud',
'secret' => '<edited>',
'memcache.local' => '\\OC\\Memcache\\APCu',
'overwritehost' => '<edited>',
'overwrite.cli.url' => 'https://<edited>/nextcloud',
'trashbin_retention_obligation' => 'auto',
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
'updater.release.channel' => 'stable',
'mysql.utf8mb4' => true,
'mail_from_address' => 'nextcloud',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => '<edited>',
'mail_smtphost' => 'localhost',
'mail_smtpport' => '25',
);
The table also looks file to my (poor) understanding
MariaDB [owncloud]> SHOW FULL COLUMNS FROM oc_properties;
+---------------+--------------+-------------+------+-----+---------+----------------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+---------------+--------------+-------------+------+-----+---------+----------------+---------------------------------+---------+
| userid | varchar(64) | utf8mb4_bin | NO | MUL | | | select,insert,update,references | |
| propertypath | varchar(255) | utf8mb4_bin | NO | | | | select,insert,update,references | |
| propertyname | varchar(255) | utf8mb4_bin | NO | | | | select,insert,update,references | |
| propertyvalue | longtext | utf8mb4_bin | NO | | NULL | | select,insert,update,references | |
| id | bigint(20) | NULL | NO | PRI | NULL | auto_increment | select,insert,update,references | |
+---------------+--------------+-------------+------+-----+---------+----------------+---------------------------------+---------+
Based on other topics I can’t solve this issue, any help is appreciated.
Thank you.
Enrico