Ad Widget

Collapse

Problems after upgrading from 2.0 to 2.4

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • der-don
    Junior Member
    • Mar 2014
    • 13

    #1

    Problems after upgrading from 2.0 to 2.4

    Hi guys,

    I run a quite large setup of Zabbix with more than 800 hosts. Now I wanted to migrate from 2.0 to 2.4. Because I wanted to export all the historic data as well, I stopped the old server made a database dump and copied it to the database of the new server. The documentation says:

    Zabbix server will automatically upgrade the database only from Zabbix 2.0.x to 2.4. For upgrading from earlier versions consult Zabbix documentation for 2.0 and earlier.
    But: When I start the server now, I will get failed queries inside the log as well as on the webinterface. Here are some samples:

    6404:20150908:125702.707 [Z3005] query failed: [1054] Unknown column 't.variables' in 'field list' [select h.hostid,h.host,h.name,t.httptestid,t.name,t.varia bles,t.headers,t.agent,t.authentication,t.http_use r,t.http_password,t.http_proxy,t.retries,t.ssl_cer t_file,t.ssl_key_file,t.ssl_key_password,t.verify_ peer,t.verify_host from httptest t,hosts h where t.hostid=h.hostid and t.nextcheck<=1441709822 and mod(t.httptestid,1)=0 and t.status=0 and h.proxy_hostid is null and h.status=0 and (h.maintenance_status=0 or h.maintenance_type=0)]
    query failed: [1054] Unknown column 'itemid' in 'field list' [select escalationid,actionid,triggerid,eventid,r_eventid, nextcheck,esc_step,status,itemid from escalations order by actionid,triggerid,itemid,escalationid]


    Can anyone tell me what I can do now to get the DB to work with the new server?

    Btw, password is correct and hostgroups etc. are displayed.

    Best regards,
    Marco

    Edit: I just had an idea: Is it possible that Zabbix didn't upgrade the db, because I created a 2.4. database and used it before I imported the 2.0 db?
    Last edited by der-don; 08-09-2015, 13:50.
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Upgrade from 2.0.x to 2.4.x should be done by upgrade first to 2.2.x.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • der-don
      Junior Member
      • Mar 2014
      • 13

      #3
      I found the issue inside the log files:

      10435:20150909:121844.038 current database version (mandatory/optional): 02010013/02010013
      10435:20150909:121844.038 required mandatory version: 02040000
      10435:20150909:121844.038 starting automatic database upgrade
      10435:20150909:121844.038 query [txnlev:1] [begin;]
      10435:20150909:121844.039 query [txnlev:1] [drop index httptest_2 on httptest]
      10435:20150909:121844.039 [Z3005] query failed: [1091] Can't DROP 'httptest_2'; check that column/key exists [drop index httptest_2 on httptest]
      10435:20150909:121844.039 query [drop index httptest_2 on httptest] failed, setting transaction as failed
      10435:20150909:121844.039 query [txnlev:1] [rollback;]
      10435:20150909:121844.039 database upgrade failed
      10435:20150909:121844.039 End of DBcheck_version():FAIL
      But I think if a upgrade to 2.2.x is really necessary, the documentation should tell you that.

      Update: I tried to install 2.2.10 first. The DB upgrade still doesn't work:

      13456:20150909:125815.322 current database version (mandatory/optional): 02010013/02010013
      13456:20150909:125815.322 required mandatory version: 02020000
      13456:20150909:125815.322 optional patches were found
      13456:20150909:125815.322 starting automatic database upgrade
      13456:20150909:125815.323 [Z3005] query failed: [1091] Can't DROP 'httptest_2'; check that column/key exists [drop index httptest_2 on httptest]
      13456:20150909:125815.323 database upgrade failed
      Can anyone tell me why httptest_2 doesn't exist? And can I just create it?
      Last edited by der-don; 09-09-2015, 13:00.

      Comment

      Working...