Ad Widget

Collapse

Database errors after upgrade to 5.4.2 from 5.2.x

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skygge
    Member
    • Jun 2009
    • 46

    #1

    Database errors after upgrade to 5.4.2 from 5.2.x

    Hello!

    I upgraded Zabbix Server and Proxies to 5.4.2.
    On server database upgrade went ok (except errors pointed here: https://www.zabbix.com/forum/zabbix-...-upgrade-error)
    but after executing these 3 queries database upgrade was finished OK.

    On Zabbix Proxies I removed databases and created new ones from scratch using provided SQL script.

    Now I have errors:

    On Proxies:
    29667:20210705:084146.183 cannot obtain configuration data from server at "X.X.X.X": failed to get data from table "hosts"

    On Server:
    18292:20210705:090542.082 cannot collect configuration data for proxy "Proxy-YYYYY" at "Y.Y.Y.Y": failed to get data from table "hosts"
    18291:20210705:091343.963 [Z3005] query failed: [1054] Unknown column 'disable_until' in 'field list' [update hosts set disable_until=1625469283 where hostid=10836]
    18291:20210705:091413.964 [Z3005] query failed: [1054] Unknown column 'disable_until' in 'field list' [update hosts set disable_until=1625469313 where hostid=10535]
    18291:20210705:091443.983 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469343 where hostid=13325]
    18289:20210705:091446.616 [Z3005] query failed: [1054] Unknown column 'snmp_errors_from' in 'field list' [update hosts set snmp_errors_from=1625469286,snmp_disable_until=162 5469301 where hostid=13505]
    18291:20210705:091513.985 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469373 where hostid=13462]
    18291:20210705:091544.015 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469404 where hostid=11661]
    18291:20210705:091614.015 [Z3005] query failed: [1054] Unknown column 'disable_until' in 'field list' [update hosts set disable_until=1625469434 where hostid=13395]
    18291:20210705:091644.017 [Z3005] query failed: [1054] Unknown column 'disable_until' in 'field list' [update hosts set disable_until=1625469464 where hostid=10256]
    18291:20210705:091714.018 [Z3005] query failed: [1054] Unknown column 'disable_until' in 'field list' [update hosts set disable_until=1625469494 where hostid=10282]
    18291:20210705:091744.019 [Z3005] query failed: [1054] Unknown column 'disable_until' in 'field list' [update hosts set disable_until=1625469524 where hostid=13282]
    18291:20210705:091814.030 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469554 where hostid=13627]
    18291:20210705:091844.044 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469584 where hostid=13617]
    18291:20210705:091844.067 [Z3005] query failed: [1054] Unknown column 'errors_from' in 'field list' [update hosts set errors_from=0,disable_until=0 where hostid=12090]
    18291:20210705:091914.069 [Z3005] query failed: [1054] Unknown column 'errors_from' in 'field list' [update hosts set errors_from=1625469554,disable_until=1625469569 where hostid=12090]
    18291:20210705:091944.099 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469644 where hostid=13655]
    18291:20210705:092014.117 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469674 where hostid=13719]
    18291:20210705:092044.118 [Z3005] query failed: [1054] Unknown column 'disable_until' in 'field list' [update hosts set disable_until=1625469704 where hostid=11161]
    18291:20210705:092114.148 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469734 where hostid=13788]
    18291:20210705:092144.165 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469764 where hostid=11521]
    18291:20210705:092214.196 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469794 where hostid=11526]
    18291:20210705:092244.220 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469824 where hostid=12095]
    18291:20210705:092314.220 [Z3005] query failed: [1054] Unknown column 'disable_until' in 'field list' [update hosts set disable_until=1625469854 where hostid=13374]
    18291:20210705:092344.252 [Z3005] query failed: [1054] Unknown column 'snmp_disable_until' in 'field list' [update hosts set snmp_disable_until=1625469884 where hostid=11885]

    Table hosts has no columns above, either on Server and Proxy instances.

    Please help, my Zabbix is not collecting new data.
    Thanks,
    Skygge
  • skygge
    Member
    • Jun 2009
    • 46

    #2
    Seems like these columns were removed from table "hosts", but Zabbix (5.4.2) tries to write data to these columns and read from them. I'll try to re-create them and see what happens.

    Comment

    • skygge
      Member
      • Jun 2009
      • 46

      #3
      Added missing colums:

      alter table hosts
      add `snmp_errors_from` integer DEFAULT 0 NOT NULL,
      add `snmp_disable_until` integer DEFAULT 0 NOT NULL,
      add `disable_until` integer DEFAULT 0 NOT NULL,
      add `errors_from` integer DEFAULT 0 NOT NULL,
      add `available` integer DEFAULT 0 NOT NULL;


      alter table config
      add compression_availability integer DEFAULT 0 NOT NULL;


      but now I have:
      Proxy:
      # /usr/local/sbin/zabbix_proxy --version
      zabbix_proxy (Zabbix) 5.4.2
      Revision 4c8f9aabe1 28 June 2021, compilation time: Jul 1 2021 16:31:28

      log:
      1117:20210705:121213.854 cannot obtain configuration data from server at "X.X.X.X": failed to get data from table "hosts"


      Server:
      # zabbix_server --version
      zabbix_server (Zabbix) 5.4.2
      Revision 4c8f9aabe1 28 June 2021, compilation time: Jul 1 2021 15:33:01

      log:
      18296:20210705:122911.327 proxy "Proxy-YYY" protocol version 5.4 differs from server version 5.2
      18296:20210705:122911.327 cannot accept proxy data
      18263:20210705:122917.196 [Z3005] query failed: [1146] Table 'zabbix.applications' doesn't exist [select distinct t.triggerid,a.name from applications a,items_applications i,functions f,triggers t where a.applicationid=i.applicationid and i.itemid=f.i
      temid and f.triggerid=t.triggerid and t.triggerid=122177]

      Comment

      • skygge
        Member
        • Jun 2009
        • 46

        #4
        Mea culpa, mea culpa, mea maxima culpa...

        This is what happens if you don't read upgrade procedure carefully.
        PerconaDB upgraded from 5.6 to 5.7 and all problems are magically solved.
        Cheers!

        Comment

        • diego.vaz
          Junior Member
          • Oct 2022
          • 2

          #5

          Estou tentando configurar o primeiro acesso no zabbix, esta dando esse erro, alguém pode me ajudar?

          Click image for larger version

Name:	image.png
Views:	969
Size:	52.3 KB
ID:	453386

          Comment

          Working...