Ad Widget

Collapse

Upgrade Zabbix problem regarding the Database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rexzhen
    Junior Member
    • Jan 2009
    • 11

    #1

    Upgrade Zabbix problem regarding the Database

    My current Version is 1.4.6, i plan to upgrade it to 1.8.3.

    I read the documentation for both 1.6 and 1.8.
    1. it seams i have to upgrade from 1.4 to 1.6 and from 1.6 to 1.8.
    2. the patch.sql is used for upgrade the existing database.

    I have a question,
    Can I install the fresh 1.8.3 in a new box, and restore the backup from the 1.4?
    I tried, but there is a lot error in the zabbix web-interface after i import the database from the 1.4.
  • rexzhen
    Junior Member
    • Jan 2009
    • 11

    #2
    Anyone know?

    Any one can help me that?

    Comment

    • walterheck
      Senior Member
      • Jul 2009
      • 153

      #3
      It seems unlikely that that would work. What you could do (I think, you'll have to test it out):

      1: backup 1.4
      2: restore it on the new server
      3: run the upgrade script for 1.6, then the one for 1.8.
      4: start the 1.8 server and be all happy and smily
      Free and Open Source Zabbix Templates Repository | Hosted Zabbix @ Tribily (http://tribily.com)

      Comment

      • rexzhen
        Junior Member
        • Jan 2009
        • 11

        #4
        Good Idea

        I will try that way. Thank you very much.

        Comment

        • rexzhen
          Junior Member
          • Jan 2009
          • 11

          #5
          Still has some problem.

          1.restore the db from 1.4.6 to new box. (succeed)
          2.Ran patch from 1.4 to 1.6.(Succeed)
          3.Ran patch from 1.6 to 1.8. Got these error
          ERROR 1061 (42000) at line 1: Duplicate key name 'actions_1'
          ERROR 1061 (42000) at line 40: Duplicate key name 'dhosts_1'
          ERROR 1061 (42000) at line 44: Duplicate key name 'dservices_1'
          ERROR 1061 (42000) at line 46: Duplicate key name 'escalations_2'
          ERROR 1061 (42000) at line 68: Duplicate key name 'graphs_items_1'
          ERROR 1061 (42000) at line 69: Duplicate key name 'graphs_items_2'
          ERROR 1061 (42000) at line 246: Duplicate key name 'history_log_2'
          ERROR 1061 (42000) at line 247: Duplicate key name 'history_text_2'
          ERROR 1061 (42000) at line 272: Duplicate key name 'httptest_2'
          ERROR 1061 (42000) at line 273: Duplicate key name 'httptest_3'
          ERROR 1061 (42000) at line 351: Duplicate key name 'services_1'

          and when i check the GUI, a lot of error in the page too.

          # Error in query [SELECT u.*,s.* FROM sessions s,users u WHERE s.sessionid='b97533bffbba70633c692a8781cf58b0' AND s.status=0 AND s.userid=u.userid AND ((s.lastaccess+u.autologout>1282601540) OR (u.autologout=0)) AND ((u.userid BETWEEN 000000000000000 AND 099999999999999))] [Unknown column 's.status' in 'where clause']
          # mysql_fetch_assoc() expects parameter 1 to be resource, boolean given[/usr/share/zabbix/include/db.inc.php:546]
          # mysql_free_result() expects parameter 1 to be resource, boolean given[/usr/share/zabbix/include/db.inc.php:548]
          # Error in query [INSERT INTO sessions (sessionid,userid,lastaccess,status) VALUES ('0647d721920616c824095661a5914759',2,1282601540,0 )] [Unknown column 'status' in 'field list']

          what is the problem?

          Comment

          • rexzhen
            Junior Member
            • Jan 2009
            • 11

            #6
            upgrde

            OK, i figured it out and make it in further step.

            i have to run the upgrade script instead of run the patch.sql from 1.6 to 1.8. and it looks running smoothly and no error at this time.

            But after i edit the zabbix_server,conf file and adjust the database information.

            In the GUI i still have this error,

            # Error in query [INSERT INTO sessions (sessionid,userid,lastaccess,status) VALUES ('8ad9a975de62907ec93a2a1742f2f4ed',2,1282605774,0 )] [Unknown column 'status' in 'field list']
            # Error in query [SELECT MAX(g.gui_access) as gui_access FROM usrgrp g, users_groups ug WHERE ug.userid=2 AND g.usrgrpid=ug.usrgrpid ] [Unknown column 'g.gui_access' in 'field list']
            # mysql_fetch_assoc() expects parameter 1 to be resource, boolean given[/usr/share/zabbix/include/db.inc.php:546]
            # mysql_free_result() expects parameter 1 to be resource, boolean given[/usr/share/zabbix/include/db.inc.php:548]
            # Error in query [SELECT g.usrgrpid FROM usrgrp g, users_groups ug WHERE ug.userid = 2 AND g.usrgrpid = ug.usrgrpid AND g.users_status = 1 LIMIT 1 OFFSET 0] [Unknown column 'g.users_status' in 'where clause']

            Comment

            • rexzhen
              Junior Member
              • Jan 2009
              • 11

              #7
              resolved

              issue resolved.

              in the new version, i have to edit dbconfig.php to use the db where the db restored to.

              Comment

              • walterheck
                Senior Member
                • Jul 2009
                • 153

                #8
                And you are sure the 1.6 version doesn't have any problems in it after you ran the upgrade script? Maybe you should generate an empty schema for 1.8, then use one of the maatkit tools (i think it is mk-table-sync with some special options, http://maatkit.org) to make sure the two schemas are at least similar.
                Free and Open Source Zabbix Templates Repository | Hosted Zabbix @ Tribily (http://tribily.com)

                Comment

                Working...