Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-3870

Zabbix Proxy cannot update database in 1.9.5 builds.

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 1.9.7 (beta)
    • 1.9.5 (alpha)
    • Proxy (P)
    • Zabbix-1.9.5-20086 RHEL6 x86_64. MySQL 5.1.52. PHP-5.3.2 Apache 2.2.15

      Initial startup debug log from proxy indicates disconnect between database schema and daemon queries. On a clean startup with only one host enabled for monitoring through the proxy, the server successfully sends config data to the proxy, but the proxy cannot take action on its local database:

      1. log snippets, full versions attached:
      1. zbxserver01:
        20746:20110608:092902.811 Deleted 0 records from history and trends
        20731:20110608:092912.351 Sending configuration data to proxy 'zbxproxy01'. Datalen 16272
      1. zbxproxy01:
        25215:20110608:092912.355 Received configuration data from server. Datalen 16272
        25215:20110608:092912.367 [Z3005] query failed: [1451] Cannot delete or update a parent row: a foreign key constraint fails (`zabbix_20086`.`optemplate`, CONSTRAINT `c_optemplate_2` FOREIGN KEY (`templateid`) REFERENCES `hosts` (`hostid`)) [delete from hosts where hostid in (10001,10002,10003,10004,10007,10008,10009,10010,10011,10012,10013,10014,10015,10016,10017,10018,10019,10020,10021,10022,10023,10024,10025,10026,10027,10028,10029,10030,10031,10032,10033,10034,10035,10036,10038,10039,10040,10041,10042,10043,10044,10045,10046)]

      This problem appears to be due to changes made to the zabbix server default templates, where I have deleted many of the default entries, and created several new ones. The proxy was set up with the STOCK sql per installation instructions. The query failure seems to be due to these discrepancies, and the daemons are not replicating changes from the master zabbix server to proxy instance. Note that this same behaviour appears to be happening in my tests when using DM child nodes.

      Example of the failing criteria query run on both the zabbix server and proxy illustrating the differences in DB content:

      1. zbxserver01:
        mysql> select hostid,host from hosts where hostid in (10001,10002,10003,10004,10007,10008,10009,10010,10011,10012,10013,10014,10015,10016,10017,10018,10019,10020,10021,10022,10023,10024,10025,10026,10027,10028,10029,10030,10031,10032,10033,10034,10035,10036,10038,10039,10040,10041,10042,10043,10044,10045,10046);
        -----------------------------------------+
        hostid host

        -----------------------------------------+

        10003 Template_App_MySQL
        10014 Template_MacOS_X
        10041 Template_Microsoft_Exchange_2007
        10044 Template_Microsoft_SQLServer_2005
        10007 Template_SNMPv2_Device
        10004 Template_Standalone
        10017 Zabbix server

        -----------------------------------------+
        7 rows in set (0.00 sec)

      1. zbxproxy01:
        ,10039,10040,10041,10042,10043,10044,10045,10046);
        ----------------------------------------------+
        hostid host

        ----------------------------------------------+

        10025 Template_3COM_3824
        10026 Template_3COM_4400
        10012 Template_AIX
        10027 Template_APC_Automatic_Transfer_Switch
        10020 Template_APC_Battery
        10003 Template_App_MySQL
        10031 Template_C3750-48TS
        10030 Template_Cisco_2960
        10028 Template_Cisco_837
        10029 Template_Cisco_877
        10023 Template_Cisco_PIX
        10032 Template_Cisco_PIX515E
        10018 Template_Cisco_PIX_525
        10022 Template_Dell_OpenManage
        10033 Template_Dell_PowerConnect_5224
        10034 Template_Dell_PowerConnect_5324
        10019 Template_Dell_PowerConnect_6248
        10024 Template_Dell_PowerEdge
        10008 Template_FreeBSD
        10035 Template_Hibernate
        10013 Template_HPUX
        10036 Template_HP_ColorLaserJet
        10021 Template_HP_InsightManager
        10038 Template_HP_Procurve
        10042 Template_IPMI_Sun_Fire_X4100_M2
        10039 Template_Java
        10001 Template_Linux
        10014 Template_MacOS_X
        10040 Template_Microsoft_Exchange_2003
        10041 Template_Microsoft_Exchange_2007
        10044 Template_Microsoft_SQLServer_2005
        10046 Template_NetScreen_25
        10011 Template_Netware
        10009 Template_OpenBSD
        10045 Template_pfSense
        10016 Template_SNMPv1_Device
        10007 Template_SNMPv2_Device
        10015 Template_Solaris
        10004 Template_Standalone
        10043 Template_Tomcat
        10010 Template_Tru64
        10002 Template_Windows
        10017 Zabbix server

        ----------------------------------------------+
        43 rows in set (0.00 sec)

        1. zabbix_proxy.log
          21 kB
          Eli Stair
        2. zabbix_server.log
          18 kB
          Eli Stair

            sasha Alexander Vladishev
            eli.stair Eli Stair
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: