Ad Widget

Collapse

zabbix error upgrade from 3.0 to 4.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AnayaBit
    Junior Member
    • Aug 2019
    • 4

    #1

    zabbix error upgrade from 3.0 to 4.2

    Hi there! I hope you can help me I am trying to upgrade from zabbix 3.0 to 4.2 on a new server with a clean installation I did a dump of the SQL database, to restore it on the new server but it shows me the following error the log

    Code:
     
     88366:20190805:124331.921 Starting Zabbix Server. Zabbix 4.2.5 (revision 2c0e4d1d39).  88366:20190805:124331.999 ****** Enabled features ******  88366:20190805:124331.999 SNMP monitoring:           YES  88366:20190805:124331.999 IPMI monitoring:           YES  88366:20190805:124331.999 Web monitoring:            YES  88366:20190805:124331.999 VMware monitoring:         YES  88366:20190805:124331.999 SMTP authentication:       YES  88366:20190805:124331.999 Jabber notifications:       NO  88366:20190805:124331.999 Ez Texting notifications:  YES  88366:20190805:124331.999 ODBC:                      YES  88366:20190805:124331.999 SSH2 support:              YES  88366:20190805:124331.999 IPv6 support:              YES  88366:20190805:124331.999 TLS support:               YES  88366:20190805:124331.999 ******************************  88366:20190805:124331.999 using configuration file: /etc/zabbix/zabbix_server.conf  88366:20190805:124332.005 current database version (mandatory/optional): 04020000/04020000  88366:20190805:124332.005 required mandatory version: 04020000  88366:20190805:124332.055 starting event name update forced by database upgrade  88366:20190805:124332.057 completed 1% of event name update  88366:20190805:124332.057 [Z3005] query failed: [1054] Unknown column 'name' in 'field list' [select eventid,source,object,objectid,clock,value,acknowledged,ns,name from events where source=0 and object=0 and objectid=13295 order by eventid]  88366:20190805:124332.066 completed 77% of event name update  88366:20190805:124332.067 event name update failed  88366:20190805:124332.067 cannot complete post initialization tasks: cannot update event names
    When it reaches 77% mark error and cannot start zabbix service, do you know how it can be fixed?
  • zux
    Member
    • Sep 2018
    • 93

    #2
    Did you do any manual changes to the DB? Maybe you bumped the DB version in table 'dbversion' manually?
    It seems that you do not have the 'name' column in table events.
    This is how it should look on 4.2

    Code:
    MariaDB [zabbix]> show create table events\G
    *************************** 1. row ***************************
    Table: events
    Create Table: CREATE TABLE `events` (
    `eventid` bigint(20) unsigned NOT NULL,
    `source` int(11) NOT NULL DEFAULT '0',
    `object` int(11) NOT NULL DEFAULT '0',
    `objectid` bigint(20) unsigned NOT NULL DEFAULT '0',
    `clock` int(11) NOT NULL DEFAULT '0',
    `value` int(11) NOT NULL DEFAULT '0',
    `acknowledged` int(11) NOT NULL DEFAULT '0',
    `ns` int(11) NOT NULL DEFAULT '0',
    `name` varchar(2048) COLLATE utf8_bin NOT NULL DEFAULT '',
    `severity` int(11) NOT NULL DEFAULT '0',
    PRIMARY KEY (`eventid`),
    KEY `events_1` (`source`,`object`,`objectid`,`clock`),
    KEY `events_2` (`source`,`object`,`clock`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
    1 row in set (0.00 sec)

    Comment

    • AnayaBit
      Junior Member
      • Aug 2019
      • 4

      #3
      I did not make changes to the database by hand, but reviewing the events table and the column 'name' does not exist, do you know if I can create it?
      Thank you!


      Click image for larger version

Name:	event.png
Views:	1812
Size:	190.0 KB
ID:	384134

      Comment

      • zux
        Member
        • Sep 2018
        • 93

        #4
        In that case I have no idea how you got to
        Code:
        88366:20190805:124332.005 current database version (mandatory/optional): 04020000/04020000
        server should have executed upgrade scripts and created that column. You could just take a clean 4.2 db schema, compare the differences and manually create the column, but that's not the only thing the upgrade does, it also fills that column with a "name".
        or you could try to make a backup, drop the db and recreate it using clean schema. then load the backup again.
        use the "--no-create-info" parameter for mysqldump
        but I can't guarantee this will work, there might be other problems too.

        Comment


        • Jaani
          Jaani commented
          Editing a comment
          I am facing same error. How it is resolved. Plz help me.
      Working...