Ad Widget

Collapse

Zabbix DB ugrade fails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kavi
    Junior Member
    • Jan 2021
    • 4

    #1

    Zabbix DB ugrade fails

    hi

    when i try to start the zabbix db , upgrade fails giving below error , i have installed 4.017 server

    126916:20220526:135204.512 TLS support: YES
    126916:20220526:135204.512 ******************************
    126916:20220526:135204.512 using configuration file: /usr/local/etc/zabbix_server.conf
    126916:20220526:135204.520 current database version (mandatory/optional): 03050110/03050110
    126916:20220526:135204.520 required mandatory version: 04000000
    126916:20220526:135204.520 optional patches were found
    126916:20220526:135204.520 starting automatic database upgrade
    126916:20220526:135340.759 [Z3005] query failed: [2013] Lost connection to MySQL server during query [alter table `events` add `severity` integer default '0' not null]
    126916:20220526:135340.759 slow query: 96.238798 sec, "alter table `events` add `severity` integer default '0' not null"
    126916:20220526:135340.761 database upgrade failed
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Lost connection to MySQL server during query

    Your DB just disconnects you due to long running query... Try to modify DB setting to make it wait longer..

    Comment

    • kavi
      Junior Member
      • Jan 2021
      • 4

      #3
      I am trying to connect zabbix 4.017 server to the DB which is of 2TB data . It was working earlier with old zabbix 4..017 server , for some reason we had to decommission the initial zabbix 4.0.17 and recreate new server .

      i installed zabix 4.0.17 on new and which connected to earlier 4.0.17 DB server and started the service . And upgrade failed like i mentioned above.

      To make this work let me know what changes i have to make in DB side.

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        Sry, I don't know a thing about mysql... Try to do some googling for "mysql query timeout increase".

        But seems like your DB is not from 4.0 but from 3.0... Otherwise it would not need to do upgrade...
        Code:
        126916:20220526:135204.520 current database version (mandatory/optional): 03050110/03050110
        126916:20220526:135204.520 required mandatory version: 04000000

        Comment

        • tim.mooney
          Senior Member
          • Dec 2012
          • 1427

          #5
          Originally posted by cyber
          But seems like your DB is not from 4.0 but from 3.0... Otherwise it would not need to do upgrade...
          Code:
          126916:20220526:135204.520 current database version (mandatory/optional): 03050110/03050110
          126916:20220526:135204.520 required mandatory version: 04000000
          Cyber is right, that looks like a database from one of the 4.0 alpha releases. 03.05.XXXX never existed as a Zabbix release version, that database version is probably what was used for alpha/beta versions of 4.0.

          You don't say what version of MySQL/MariaDB/Percona you're using, but have you checked the database logs for around the time that the Zabbix DB upgrade fails? Cyber's theory that it might be a database timeout is possible, but you should also check the database logs to look for other messages from about the same time.

          Comment

          Working...