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

Upgrade from14 to 15.0.2 - ADD password_invalid TINYINT #13732

Closed
Altau3 opened this issue Jan 22, 2019 · 5 comments
Closed

Upgrade from14 to 15.0.2 - ADD password_invalid TINYINT #13732

Altau3 opened this issue Jan 22, 2019 · 5 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@Altau3
Copy link

Altau3 commented Jan 22, 2019

When upgrade to 15.0.2 by browser, I get this message :

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_authtoken ADD password_invalid TINYINT(1) DEFAULT '0' NOT NULL': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

@Altau3 Altau3 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jan 22, 2019
@Altau3
Copy link
Author

Altau3 commented Jan 22, 2019

When upgrading with command line :

root@server nextcloud #sudo -u www-data php occ maintenance:mode --on
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Maintenance mode enabled
root@server nextcloud #sudo -u www-data php occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Updating database schema
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_authtoken ADD password_invalid TINYINT(1) DEFAULT '0' NOT NULL':

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
Update failed
Maintenance mode is kept active
Reset log level

@Altau3 Altau3 closed this as completed Jan 22, 2019
@Altau3 Altau3 reopened this Jan 22, 2019
@Snake883
Copy link

Snake883 commented Jan 22, 2019

Same error.
This seems to happen a lot on upgrades.
#10535
#10449

Attempted to do some workaround fixes, but now proceeds with new errors (similar to https://help.nextcloud.com/t/error-after-updating-from-15-0-to-15-0-1/44859):

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Failed to load repair step for dav: Repair step 'OCA\DAV\Migration\FixBirthdayCalendarComponent' is unknown
Failed to load repair step for dav: Repair step 'OCA\DAV\Migration\CalDAVRemoveEmptyValue' is unknown
Failed to load repair step for dav: Repair step 'OCA\DAV\Migration\BuildCalendarSearchIndex' is unknown
Failed to load repair step for dav: Repair step 'OCA\DAV\Migration\RefreshWebcalJobRegistrar' is unknown
Failed to load repair step for dav: Repair step 'OCA\DAV\Migration\RemoveClassifiedEventActivity' is unknown
Failed to load repair step for deck: Repair step 'OCA\Deck\Migration\UnknownUsers' is unknown
Failed to load repair step for encryption: Repair step 'OCA\Encryption\Migration\SetMasterKeyStatus' is unknown
Failed to load repair step for files_sharing: Repair step 'OCA\Files_Sharing\Migration\OwncloudGuestShareType' is unknown
Failed to load repair step for files_sharing: Repair step 'OCA\Files_Sharing\Migration\SetPasswordColumn' is unknown
Failed to load repair step for oauth2: Repair step 'OCA\OAuth2\Migration\SetTokenExpiration' is unknown
Failed to load repair step for twofactor_backupcodes: Repair step 'OCA\TwoFactorBackupCodes\Migration\CheckBackupCodes' is unknown

  • 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
  • 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
    • Avatar cache cleared
  • 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

In AbstractMySQLDriver.php line 71:

An exception occurred while executing 'SELECT id, carddata FROM oc_cards WHERE uid IS N
ULL LIMIT 1000':

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'uid' in 'where clause'

In PDOConnection.php line 106:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'uid' in 'where clause'

In PDOConnection.php line 104:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'uid' in 'where clause'

@Altau3
Copy link
Author

Altau3 commented Jan 22, 2019

I have just solved the problem with an update of mariaDB by adding to mariadb.cnf :

[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1

and used :

occ maintenance:repair

and then redo an upgrade

@bodograumann
Copy link

I’m having the same problems. Unfortunately @Altau3 ’s solution did not work for me. When I run occ mainenance:repair, I only get the “Unknown column 'uid'” errors that @snakyjake1 gets.

@bodograumann
Copy link

I now solved the problem for me.

  • The variables have to be written with underscores, not dashes. E.g. innodb_file_format.
  • When using config directories, the individual config files must end in .cnf, not .conf 🤦‍♂️
  • Doing occ maintenance:repair was not needed. Instead I just had to do the upgrade again. Might be because I already changed my tables to barracuda some time ago. Only large_prefix was not enabled because of the previous mistake...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

3 participants