Ad Widget

Collapse

Error connecting to database:

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ptera
    Senior Member
    • Oct 2014
    • 109

    #1

    Error connecting to database:

    Zabbix was working ok till today. Processor usage jumped up to 90% and started getting these messages in red bordered box

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

    I am the administrator and I do not know what to do....
  • ptera
    Senior Member
    • Oct 2014
    • 109

    #2
    337:20150424:141707.445 using configuration file: /etc/zabbix/zabbix_server.conf
    337:20150424:141707.631 current database version (mandatory/optional): 02040000/02040000
    337:20150424:141707.632 required mandatory version: 02040000
    337:20150424:141710.083 [Z3005] query failed: [2013] Lost connection to MySQL server during query [select distinct t.triggerid,t.description,t.expression,t.error,t.p riority,t.type,t.value,t.state,t.lastchange,t.stat us from hosts h,items i,functions f,triggers t where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and h.status in (0,1) and t.flags<>2]
    337:20150424:141710.083 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
    337:20150424:141710.083 database is down: reconnecting in 10 seconds
    337:20150424:141720.104 database connection re-established
    337:20150424:141727.168 [Z3005] query failed: [2013] Lost connection to MySQL server during query [select d.triggerid_down,d.triggerid_up from trigger_depends d order by d.triggerid_down]
    337:20150424:141727.168 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
    337:20150424:141727.168 database is down: reconnecting in 10 seconds

    Comment

    • ptera
      Senior Member
      • Oct 2014
      • 109

      #3
      Trying to fix it - upgrade from 2.4.4 to 2.4.5 - is there a database upgrade command missing somewhere?

      Comment

      • ptera
        Senior Member
        • Oct 2014
        • 109

        #4
        662:20150424:142453.012 [Z3005] query failed: [2006] MySQL server has gone away [select hostid,key_,state,evaltype,formula,error,lifetime from items where itemid=31602]
        510:20150424:142454.013 [Z3005] query failed: [2006] MySQL server has gone away [select hostid,key_,state,evaltype,formula,error,lifetime from items where itemid=31695]
        841:20150424:142455.021 [Z3005] query failed: [2006] MySQL server has gone away [select hostid,key_,state,evaltype,formula,error,lifetime from items where itemid=31788]
        554:20150424:142456.017 [Z3005] query failed: [2006] MySQL server has gone away [select hostid,key_,state,evaltype,formula,error,lifetime from items where itemid=31881]

        Comment

        • ptera
          Senior Member
          • Oct 2014
          • 109

          #5
          Another clue

          This started after one of the drives in the array failed. Removed it and plugged it back in and it started working again.

          Comment

          • ptera
            Senior Member
            • Oct 2014
            • 109

            #6
            It appears the 568M database file got corrupted by the drive failure.
            Restoring from last nights back up - sure is taking a long time.

            Comment

            • ptera
              Senior Member
              • Oct 2014
              • 109

              #7
              After restoring the backup I can not log into zabbix

              Error in query [SELECT p. " FROM profiles p WHERE p.userid=0 ORDER BY p.userid,p.profileid] [Table 'zabbix.profiles' doesn't exist]

              help....

              Comment

              • ptera
                Senior Member
                • Oct 2014
                • 109

                #8
                Great only half the database got backed up. Now I have to start all over again.
                This

                Comment

                • ptera
                  Senior Member
                  • Oct 2014
                  • 109

                  #9
                  Wish I had seen this before....

                  Dump doesn't work. If you have huge tables with billions of rows your backup process could become a nightmare, mainly if you need to restore it.

                  Starting over

                  Comment

                  Working...