Ad Widget

Collapse

Zabbix server can't start, complains about database version

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • it.tech
    Junior Member
    • May 2021
    • 28

    #1

    Zabbix server can't start, complains about database version

    Hello Zabbians,
    I ran into an issue with starting the server when everything was installed according to the documentation.
    This is a fresh install of latest Fedora 34 as the server.
    Here's what I used:
    Zabbix is being downloaded over 4 000 000 times every year for a reason. Download and install Zabbix for free and try it yourself!


    Actually tried two types of installation, one for ver 5 and the other for ver 5.4
    Both install Zabbix server ver 5.0.10 which is odd.
    Here are my observations, when I pull the install for ver 5.0 and having completed everything I end up with an error for a missing SQL schema file that needs to be imported.
    Then I i installed ver 5.4 and this time create.tag.gz was found and the schema import was successful.
    But regardless of that the server doesn't start. In both cases I see that it is still ver 5.0.10 and it requires database version 050000

    42155:20210605:143212.652 Starting Zabbix Server. Zabbix 5.0.10 (revision 7c3f43904c).
    42155:20210605:143212.652 ****** Enabled features ******
    42155:20210605:143212.652 SNMP monitoring: YES
    42155:20210605:143212.652 IPMI monitoring: YES
    42155:20210605:143212.652 Web monitoring: YES
    42155:20210605:143212.652 VMware monitoring: YES
    42155:20210605:143212.652 SMTP authentication: YES
    42155:20210605:143212.652 ODBC: YES
    42155:20210605:143212.652 SSH support: YES
    42155:20210605:143212.652 IPv6 support: YES
    42155:20210605:143212.652 TLS support: YES
    42155:20210605:143212.652 ******************************
    42155:20210605:143212.652 using configuration file: /etc/zabbix_server.conf
    42155:20210605:143212.660 The server does not match Zabbix database. Current database version (mandatory/optional): 05040000/
    05040000. Required mandatory version: 05000000.

  • it.tech
    Junior Member
    • May 2021
    • 28

    #2
    More comments about it, I verified the current database version and yes, it is version 05040000

    mysql> select * from dbversion;
    +-----------+----------+
    | mandatory | optional |
    +-----------+----------+
    | 5040000 | 5040000 |
    +-----------+----------+
    1 row in set (0.00 sec)

    Then I updated it like this:
    update dbversion set mandatory=05000000,optional=05000000;

    and it shows ver 0500000

    mysql> select * from dbversion;
    +-----------+----------+
    | mandatory | optional |
    +-----------+----------+
    | 5000000 | 5000000 |
    +-----------+----------+
    1 row in set (0.01 sec)

    But after I restart the zabbix server all hell goes loose. It crashes according to events in the log. I can attach it here if it matters

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      Originally posted by it.tech
      More comments about it, I verified the current database version and yes, it is version 05040000

      mysql> select * from dbversion;
      +-----------+----------+
      | mandatory | optional |
      +-----------+----------+
      | 5040000 | 5040000 |
      +-----------+----------+
      1 row in set (0.00 sec)

      Then I updated it like this:
      update dbversion set mandatory=05000000,optional=05000000;
      Oh no, definitely don't do that. You've just lied to your Zabbix server process, telling it that the database schema is suitable for Zabbix 5.1.x, when in reality it's a database schema for Zabbix 5.4.x.

      When you do initial setup, you need to load the appropriate version of the database schema, to create e.g. a database with tables, columns, indexes, constraints, etc. appropriate for the version of Zabbix you're starting with. If you create a database with the SQL file(s) that are appropriate for Zabbix 5.4.x, then you should run Zabbix 5.4.x server.

      I think you would be better off dropping your database, recreating it, and reloading the SQL file for the version of Zabbix you actually plan on running.

      Comment

      Working...