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

zabbix server on ARM platform tries to perform duplicated insert SQL

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Critical Critical
    • 3.0.0beta1
    • 3.0.0alpha5
    • Server (S)

      I could not reproduce it on regular desktop with Intel CPU.
      Not sure platform is related, but who knows ....

      This is small zabbix server running on a RaspberryPi Model B (512 MB RAM).

      # cat /proc/cpuinfo
      processor       : 0
      model name      : ARMv6-compatible processor rev 7 (v6l)
      BogoMIPS        : 2.00
      Features        : half thumb fastmult vfp edsp java tls
      CPU implementer : 0x41
      CPU architecture: 7
      CPU variant     : 0x0
      CPU part        : 0xb76
      CPU revision    : 7
      
      Hardware        : BCM2708
      Revision        : 000e
      Serial          : 00000000dc8125bb
      
      # cat /etc/debian_version
      7.8
      # cat /etc/issue
      Raspbian GNU/Linux 7 \n \l
      # uname -a
      Linux kot2 4.1.7+ #817 PREEMPT Sat Sep 19 15:25:36 BST 2015 armv6l GNU/Linux
      # mysql -V
      mysql  Ver 14.14 Distrib 5.5.46, for debian-linux-gnu (armv7l) using readline 6.2
      

      Zabbix server is compiled on this host from sources and running with mysql server (innodb_buffer_pool_size = 128M).
      Regular 32GB SD card is used as a hard drive.
      Raspbian linux is up to date.
      Zabbix trunk versions 3.0.0+ are always running on this host, sometimes recompiled.

      I've noticed some SQL errors in zabbix_server.log, could not understand why they appear.
      I'm 99% sure that such SQLs were missing for example 5 months ago when this small zabbix installation was rolled out based on some revision of trunk (3.0.0+).

      To make a clean test I've created a fresh mysql database (based on trunk r57353), unlink&clear "app zabbix server" template, set 2 discovery rules (from "Template OS Linux") scheduled update interval to m/1 (just to be sure when LLD rules are executed), but SQL errors still are appearing.

        3016:20151223:183401.036 [Z3005] query failed: [1062] Duplicate entry '350-23663' for key 'items_applications_1' [insert into items_applications (itemappid,applicationid,itemid) values (5893,350,23663),(5894,350,23664),(5895,350,23662),(5896,350,23665);]
        3016:20151223:183401.159 [Z3005] query failed: [1062] Duplicate entry '347-23667' for key 'items_applications_1' [insert into items_applications (itemappid,applicationid,itemid) values (5893,347,23667),(5894,347,23669),(5895,347,23666),(5896,347,23668),(5897,347,23670);]
      

      Taking into account that I cannot reproduce it on my Intel CPU workstation - I suppose that something is wrong with zabbix server daemon on ARM platform.

      Attached server log file shows those SQLs when debug level was 3 and also when level was increased to 4 for single running poller.

      p.s. when this zabbix server is running with "production" database - server logs additional SQL error, related to lld graph elements creation for missing items, but I guess it has the same nature.
      They are probably relates to new network interface recently added to this host and started to be discoverable.

      9193:20151222:182758.445 [Z3005] query failed: [1452] Cannot add or update a child row: a foreign key constraint fails (`trunk`.`graphs_items`, CONSTRAINT `c_graphs_items_2` FOREIGN KEY (`itemid`) REFERENCES `items` (`itemid`) ON DELETE CASCADE) [insert into graphs_items (gitemid,graphid,itemid,drawtype,sortorder,color,yaxisside,calc_fnc,type) values (1849,554,23748,5,0,'00AA00',0,2,0),(1850,554,23749,5,1,'3333FF',0,2,0);]
      

        1. zabbix_server.log
          238 kB
        2. ZBX-10194.patch
          1 kB
        3. config-prev.log
          288 kB
        4. config.log
          290 kB
        5. memcmp.c
          0.5 kB

            Unassigned Unassigned
            zalex_ua Oleksii Zagorskyi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: