Ad Widget

Collapse

Zabbix v6 Upgrade Issues

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lehmanp
    Junior Member
    • Mar 2021
    • 4

    #1

    Zabbix v6 Upgrade Issues

    Server was Ubuntu 18.04, MariaDB 10.1 with Zabbix 4.4

    Upgraded to Zabbix 6 with MariaDB 10.6 (used apt install) (did a DB dump too)

    Zabbix is saying the DB is an unsupported version. Log has:

    4079:20220216:103359.325 [Z3005] query failed: [1709] Index column size too large. The maximum column size is 767 bytes [create index items_1 on items (hostid,key_(1021))]

    4079:20220216:103359.325 database upgrade failed

    4157:20220216:103409.505 Starting Zabbix Server. Zabbix 6.0.0 (revision 5203d2ea7d).

    4157:20220216:103409.505 ****** Enabled features ******

    4157:20220216:103409.505 SNMP monitoring: YES

    4157:20220216:103409.506 IPMI monitoring: YES

    4157:20220216:103409.506 Web monitoring: YES

    4157:20220216:103409.506 VMware monitoring: YES

    4157:20220216:103409.506 SMTP authentication: YES

    4157:20220216:103409.506 ODBC: YES

    4157:20220216:103409.506 SSH support: YES

    4157:20220216:103409.506 IPv6 support: YES

    4157:20220216:103409.506 TLS support: YES

    4157:20220216:103409.506 ******************************

    4157:20220216:103409.506 using configuration file: /etc/zabbix/zabbix_server.conf

    4157:20220216:103409.518 current database version (mandatory/optional): 04050003/04050003

    4157:20220216:103409.518 required mandatory version: 06000000

    4157:20220216:103409.518 starting automatic database upgrade



    If I go into mysql, the zabbix DB is there and mysql -V says 10.6.

    I did replace my conf files with the new ones during the Zabbix upgrade.
  • Answer selected by lehmanp at 17-02-2022, 17:48.
    tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    This issue is discussed in the upgrade notes for Zabbix 5.0.0, since that's the first version where people were likely to experience the problem: https://www.zabbix.com/documentation...rade_notes_500

    Databases created in MariaDB 10.1 and earlier used ROW_FORMAT=COMPACT.

    The default ROW_FORMAT switched to DYNAMIC in the MariaDB 10.2 series, but existing tables are not converted to ROW_FORMAT=DYNAMIC, even by the upgrade procedure you ran to upgrade your 10.1 files to 10.6 (you did run that procedure, correct?).

    You can either issue SQL commands to alter each table and change its ROW_FORMAT to DYNAMIC or you can dump your database, drop your database, and then reload the database from backup. Since you're now running 10.6, its defaults will apply when the tables are recreated, so they will be created with ROW_FORMAT=DYNAMIC. Be sure though that you have the MariaDB config files in place that are for 10.6; if the database upgrade procedure didn't replace the 10.1 config files, make sure you've done that with the 10.6 files.

    For my site, I converted each table to ROW_FORMAT=DYNAMIC. Be advised that this procedure uses space in whatever temp filesystem you've designated (/tmp or /var/tmp) so you need to have enough space for your largest table (probably history or history_uint) plus about 20%. The conversion process is discussed in the two ZBX issues that are linked to from the release notes. As long as you have the space on your system, it's not difficult, it's just a bit time-consuming.

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #2
      This issue is discussed in the upgrade notes for Zabbix 5.0.0, since that's the first version where people were likely to experience the problem: https://www.zabbix.com/documentation...rade_notes_500

      Databases created in MariaDB 10.1 and earlier used ROW_FORMAT=COMPACT.

      The default ROW_FORMAT switched to DYNAMIC in the MariaDB 10.2 series, but existing tables are not converted to ROW_FORMAT=DYNAMIC, even by the upgrade procedure you ran to upgrade your 10.1 files to 10.6 (you did run that procedure, correct?).

      You can either issue SQL commands to alter each table and change its ROW_FORMAT to DYNAMIC or you can dump your database, drop your database, and then reload the database from backup. Since you're now running 10.6, its defaults will apply when the tables are recreated, so they will be created with ROW_FORMAT=DYNAMIC. Be sure though that you have the MariaDB config files in place that are for 10.6; if the database upgrade procedure didn't replace the 10.1 config files, make sure you've done that with the 10.6 files.

      For my site, I converted each table to ROW_FORMAT=DYNAMIC. Be advised that this procedure uses space in whatever temp filesystem you've designated (/tmp or /var/tmp) so you need to have enough space for your largest table (probably history or history_uint) plus about 20%. The conversion process is discussed in the two ZBX issues that are linked to from the release notes. As long as you have the space on your system, it's not difficult, it's just a bit time-consuming.

      Comment

      • lehmanp
        Junior Member
        • Mar 2021
        • 4

        #3
        That took care of that error. Now the server won't start.

        Comment

        • lehmanp
          Junior Member
          • Mar 2021
          • 4

          #4
          Note, I had to increase the Cache size from 32M to 64M before the Zabbix-server would start and stay running. Now, finally, its all looking good!

          Comment

          Working...