Ad Widget

Collapse

Upgrade zabbix from 2.2.1 to 2.4.1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mick
    Member
    • Jan 2014
    • 31

    #1

    Upgrade zabbix from 2.2.1 to 2.4.1

    Hello, I try upgrade my zabbix from 2.2.1 to 2.4.1 but I have problem with database upgrade, after update all of components of zabbix when I try login i see this error:

    Database error
    The frontend does not match Zabbix database. Current database version (mandatory/optional): 2030004/2030004. Required mandatory version: 2040000. Contact your system administrator.

    Anybody have some idea what I can do this ?

    Regards
    Maciej
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    Is it for sure that the Zabbix server binary is of release 2.4?
    Did you have checked your Zabbix server log whether the upgrade completely finished successfully?

    Comment

    • Mick
      Member
      • Jan 2014
      • 31

      #3
      I update with Yum all zabbix components ( zabbix-server, zabbix-web, zabbix-agent, zabbix-java-gateway), after this when I try start zabbix-server I cannot do this. In this link there is log file from zabbix server http://pastebin.com/GExYf6qj

      Comment

      • BDiE8VNy
        Senior Member
        • Apr 2010
        • 680

        #4
        Well, the upgrade failed - that's for sure:

        Code:
        2144:20140720:211643.853 database upgrade failed
        Did you have modified anything at database level?
        Try to find out why the alter table statement fails. Did you have investigated the database logs yet?

        Comment

        • nick0909
          Member
          • Apr 2013
          • 73

          #5
          I would guess the application is all upgraded but the database upgrade failed. Download the source files and there should be a database upgrade script in there, run it manually and see if it works or errors out, then work on the errors if there are any.

          Comment

          • Mick
            Member
            • Jan 2014
            • 31

            #6
            I try use automatic upgrade, but after lunch zabbix server in logfile I see this :

            Code:
            2144:20140720:211643.778 required mandatory version: 02040000
              2144:20140720:211643.778 starting automatic database upgrade
              2144:20140720:211643.778 query [txnlev:1] [begin;]
              2144:20140720:211643.778 query [txnlev:1] [alter table trigger_discovery add constraint c_trigger_discovery_1 foreign key (triggerid) references triggers (triggerid) on delete cascade]
              2144:20140720:211643.852 [Z3005] query failed: [1005] Can't create table 'zabbix.#sql-6e2_bd' (errno: 150) [alter table trigger_discovery add constraint c_trigger_discovery_1 foreign key (triggerid) references triggers (triggerid) on delete cascade]
              2144:20140720:211643.853 query [alter table trigger_discovery add constraint c_trigger_discovery_1 foreign key (triggerid) references triggers (triggerid) on delete cascade] failed, setting transaction as failed
              2144:20140720:211643.853 query [txnlev:1] [rollback;]
              2144:20140720:211643.853 database upgrade failed
              2144:20140720:211643.853 End of DBcheck_version():FAIL

            Comment

            • nick0909
              Member
              • Apr 2013
              • 73

              #7
              Right, the database upgrade failed. You will have to upgrade it manually. Follow the instructions for a manual Zabbix upgrade, but skip all the parts about compiling the binary and installing them, and only do the database upgrade scripts. Then when you run the already-upgraded Zabbix application it will find the now-upgraded database and be happy.

              --EDIT:
              Zabbix as of 2.2 no longer provides manual upgrade scripts for the database. Another person is having the same problem as you, because the zabbix binary is supposed to do the upgrade on its own and you can't look in to the script to run it manually I think the only help will come from filing a bug report.
              Last edited by nick0909; 03-12-2014, 21:54.

              Comment

              • Mick
                Member
                • Jan 2014
                • 31

                #8
                O.k I create ticket in zabbix Jira https://support.zabbix.com/browse/ZBX-9111, but anybody have some idea how I can fix it ?

                Comment

                Working...