Ad Widget

Collapse

Ошибки SQL при обновлении Zabbix 2.0.9 -> 2.2.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gabalino
    Senior Member
    • Mar 2013
    • 103

    #1

    Ошибки SQL при обновлении Zabbix 2.0.9 -> 2.2.0

    Доброго времени суток!
    После импорта БД из Zabbix Appliance 2.0.9 в 2.2.0 появляется куча ошибок связанных с SQL запросами.
    В zabbix_server.log повторяется ошибка [ no records in table 'config' ]
    Всё сделано согласно инструкции.

    Ошибки на Dashboard:

    Status of Zabbix
    Code:
    Error in query [SELECT COUNT(i.itemid) AS cnt,i.status,i.state FROM items i INNER JOIN hosts h ON i.hostid=h.hostid WHERE h.status=0 AND i.flags IN (0,4) AND i.type<>9 GROUP BY i.status,i.state] [Unknown column 'i.state' in 'field list']
    System status
    Code:
        Error in query [SELECT h.hostid,h.name FROM hosts h WHERE h.flags IN (0,4) AND h.hostid IN ('10084','10098','10132','10133','10159','10163','10170','10171','10180','10203','10204','10262','10289') AND h.status IN (0,1,3)] [Unknown column 'h.flags' in 'where clause']
        Undefined index: state [dashboard.php:142 → make_system_status() → CAPIObject->get() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CTrigger->get() → CZBXAPI->handleDeprecatedOutput() in /usr/share/zabbix/include/classes/api/CZBXAPI.php:982]
    ...
        Undefined index: state [dashboard.php:142 → make_system_status() → makeTriggersPopup() in /usr/share/zabbix/include/blocks.inc.php:1482]
        Undefined offset: 0 [dashboard.php:142 → make_system_status() → makeTriggersPopup() in /usr/share/zabbix/include/blocks.inc.php:1504]
        Undefined index: state [dashboard.php:142 → make_system_status() → makeTriggersPopup() in /usr/share/zabbix/include/blocks.inc.php:1482]
        Undefined offset: 0 [dashboard.php:142 → make_system_status() → makeTriggersPopup() in /usr/share/zabbix/include/blocks.inc.php:1504]
        Undefined index: state [dashboard.php:142 → make_system_status() → makeTriggersPopup() in /usr/share/zabbix/include/blocks.inc.php:1482]
    ...
    Host status
    Code:
        Error in query [SELECT DISTINCT h.hostid,h.name FROM hosts h,hosts_groups hg WHERE h.flags IN (0,4) AND hg.groupid IN ('4','5','7','8','9','10','13','14','16','17','18','22','24','26','31') AND hg.hostid=h.hostid AND h.status=0] [Unknown column 'h.flags' in 'where clause']
        Error in query [SELECT h.hostid FROM hosts h WHERE h.flags IN (0,4) AND h.hostid IN ('10084','10098','10132','10133','10159','10163','10170','10171','10180','10203','10204','10262','10289') AND h.status IN (0,1,3)] [Unknown column 'h.flags' in 'where clause']
    Last 20 ussue
    Code:
        Error in query [SELECT t.triggerid,t.state,t.error,t.url,t.expression,t.description,t.priority,t.lastchange FROM triggers t WHERE NOT EXISTS (SELECT NULL FROM functions f,items i,hosts h WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.hostid=h.hostid AND (i.status<>0 OR h.status<>0)) AND t.status=0 AND t.value='1' AND t.flags IN ('0','4') ORDER BY t.lastchange DESC LIMIT 40 OFFSET 0] [Unknown column 't.state' in 'field list']
        Error in query [SELECT h.hostid,h.name,h.status,h.maintenance_status,h.maintenance_type,h.maintenanceid FROM hosts h WHERE h.flags IN (0,4) AND 1=0 AND h.status IN (0,1)] [Unknown column 'h.flags' in 'where clause']
    Web monitoring
    Code:
        Error in query [SELECT DISTINCT g.groupid,g.name FROM groups g,hosts_groups hg WHERE g.groupid=hg.groupid AND EXISTS (SELECT NULL FROM hosts h WHERE hg.hostid=h.hostid AND h.status=0) AND EXISTS (SELECT NULL FROM httptest ht WHERE hg.hostid=ht.hostid AND ht.status=0)] [Unknown column 'ht.hostid' in 'where clause']
        Error in query [SELECT DISTINCT h.hostid FROM hosts h,hosts_groups hg WHERE h.flags IN (0,4) AND 1=0 AND hg.hostid=h.hostid AND h.status=0] [Unknown column 'h.flags' in 'where clause']
        Error in query [SELECT DISTINCT ht.httptestid,hg.groupid FROM httptest ht,hosts_groups hg WHERE ht.hostid=hg.hostid AND 1=0 AND 1=0] [Unknown column 'ht.hostid' in 'where clause']
    Attached Files
    Last edited by Gabalino; 06-12-2013, 15:30.
  • thomphi
    Member
    • Feb 2014
    • 74

    #2
    I have the same issue. Have you solved the problem?

    Comment

    • yukra
      Senior Member
      • Apr 2013
      • 1359

      #3
      Originally posted by Gabalino
      После импорта БД из Zabbix Appliance 2.0.9 в 2.2.0 появляется куча ошибок связанных с SQL запросами.

      Особенно п.6 про права. Условия выполнены?
      Может попробовать дать заббиксу пользователя root в mysql?

      Comment

      • thomphi
        Member
        • Feb 2014
        • 74

        #4
        Sorry, I don't understand..

        Comment

        • yukra
          Senior Member
          • Apr 2013
          • 1359

          #5
          Originally posted by thomphi
          Sorry, I don't understand..


          item 6:
          Start new binaries. Check log files to see if the binaries have started successfully.

          Zabbix server will automatically upgrade the database.

          Before you start the server:
          • Make sure the database user has enough permissions (create table, drop table, create index, drop index)
          • Make sure you have enough free disk space.
          It's true?

          May be reconfirure you /etc/zabbix/zabbix_server.conf for use user "root" (for mysql, or $administration_data_base for $you data_bases) and start zabbix_server?

          Comment

          Working...