Ad Widget

Collapse

2.0.2 to 2.2.0 database upgrade problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ben.bressler
    Member
    • Dec 2012
    • 45

    #1

    2.0.2 to 2.2.0 database upgrade problems

    Hello!
    I'm trying to upgrade from 2.0.2 to 2.2.0 on a Ubuntu server with MySQL as the database. When I start up the server and it goes through the automatic database upgrade process I am presented with this error:

    476:20131123:202314.374 [Z3005] query failed: [1034] Incorrect key file for table 'events'; try to repair it [create index events_1 on events (source,object,objectid,clock)]
    476:20131123:202314.397 database upgrade failed

    I've tried the repair and, unfortunately, the repair fails. I don't really care about maintaining any historical data during the upgrade to 2.2. If I could bring up 2.2 and leave all my hosts, items, triggers, actions and templates intact I'd be happy.

    Does anyone know of a way to fix the database upgrade error I'm getting? Or would it be possible to just clear out the offending data?

    Any help is appreciated.
  • ben.bressler
    Member
    • Dec 2012
    • 45

    #2
    Just wanted to bump this to see if anyone else is encountering this same issue. I'm pretty much stuck using Zabbix 2.0.2 unless there is a way to successfully upgrade my DB - which would be a bummer. I have too many servers to start from scratch with a new setup.

    Comment

    • ben.bressler
      Member
      • Dec 2012
      • 45

      #3
      To provide a bit more context for my confusion:

      When I tried running the create index statement that fails with the error:
      ERROR 1034 (HY000): Incorrect key file for table 'events'; try to repair it

      When I run "repair table events;" I get this:
      The storage engine for the table doesn't support repair.

      I would manually repair the table but when I run "check table events;":
      +---------------+-------+----------+----------+
      | Table | Op | Msg_type | Msg_text |
      +---------------+-------+----------+----------+
      | zabbix.events | check | status | OK |
      +---------------+-------+----------+----------+

      So I can't find anything to repair...

      Comment

      • MaxM
        Member
        • Sep 2011
        • 42

        #4
        Have you tried upgrading the DB to 2.0.9 manually, then starting 2.2? Not sure if that will help, but that was the exact path I followed...

        Comment

        • toddblake
          Junior Member
          Zabbix Certified Specialist
          • Jul 2011
          • 27

          #5
          tmp space was the problem

          Had this issue....

          Turns out while creating an index it needed a fair amount of disk space to do so. The tmpdir directive in /etc/my.cnf wasn't set so it defaulted to /tmp, and I found that /tmp was filling up during the index creation. I set tmpdir to somewhere with more space and it was able to complete the upgrade.

          Comment

          Working...