Database schema migration failure (Icinga Web v2.12.1)

After updating Icinga 2 and Icinga Web 2, my web interface shows there are 2 pending migrations: 2.12.0.sql and 2.11.0.sql.

Applying these migrations via the web interface fails.

The schema migrations also fail when I attempt to run them manually.

Running mysql -u root -p icingaweb2 </usr/share/icingaweb2/schema/mysql-upgrades/2.11.0.sql
results in ERROR 1071 (42000) at line 14: Specified key was too long; max key length is 767 bytes

Likewise, for the other schema, running mysql -u root -p icingaweb2 </usr/share/icingaweb2/schema/mysql-upgrades/2.12.0.sql results in ERROR 1146 (42S02) at line 1: Table ‘icingaweb2.icingaweb_schema’ doesn’t exist

Has anyone experienced a similar issue and been able to resolve it?


  • Icinga Web 2 version: 2.12.1
  • Used modules and their versions (System - About): director (master), monitoring (2.12.1)
  • Web browser used: Chrome
  • Icinga 2 version used (icinga2 --version): 2.14.0
  • PHP version used (php --version): 7.3.33
  • Server operating system and version: Cent OS 7

This already popped up here.

Though, the upgrade file for 2.11 includes a fix for this in the first five lines. So, it shouldn’t happen anymore. :roll_eyes:

Thank you! This worked perfectly!

I stumbled on this exact issue. Do I have to apply mysql.schema.sql first an then 2.11.sql, 2,12.sql?

Please advise,
Thanks

Yes, in my experience you have to apply the schema migrations in order. So 2.11.sql followed by 2.12.sql

FYI - I had to add these 3 lines in my.cnf and both patches were applied successfully.

innodb_file_format=barracuda
innodb_file_per_table=1
innodb_large_prefix=1