ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-7561

[Z3005] query failed: [1364] Field 'hardware_full' doesn't have a default value [insert into host_inventory (hostid,inventory_mode) values

    Details

    • Type: Incident report Incident report
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.2rc1, 2.3.0
    • Component/s: Server (S)
    • Environment:
      Hedhat 6.4 Linux server OS on VMWARE machine ( 8Gb memory , 50Gb disk )
      Zabbix 2.2.0 from sources compiled with gcc
      gcc-4.4.7-3.el6.x86_64
      php-5.3.3-22.el6.x86_64
      MySQL-server-5.6.15-1.el6.x86_64

      Description

      into the "zabbix_server.log" i find regular lines like this
      48751:20131218:093541.722 [Z3005] query failed: [1364] Field 'hardware_full' doesn't have a default value [insert into host_inventory (hostid,inventory_mode) values (10137,1),(10138,1),(10139,1),(10140,1);]
      into the table "host_inventory" there are ONLY two lines ( i expect +- 400 lines )

        Activity

        Hide
        richlv added a comment -

        is this an upgrade or fresh installation ?
        do you mean that this table only has two columns or two entries/rows ?

        Show
        richlv added a comment - is this an upgrade or fresh installation ? do you mean that this table only has two columns or two entries/rows ?
        Hide
        Robert VERBERT added a comment -

        This is a fresh install ( test from source version 2.2.0 )
        ( We are running production with zabbix 1.8.16 ) on all manually configured hosts ( and it is working good ) but a lot of administration is needed.

        This fresh install has only one item reference : a VMWare hyperV 5.1
        And we trying to extract all the VM machines ( Windows Servers + Redhat 6 Servers )
        Now in the environment we have: +- 25 physical machines and +- 400 gest OS's

        The ame of the test is: to let the zabbix analyze the VMWare environment and automaticly start to monitor a newly created server. ( without intervention. )
        PS: we see a lot of problems in the configuration. But we are not finished yet.

        Show
        Robert VERBERT added a comment - This is a fresh install ( test from source version 2.2.0 ) ( We are running production with zabbix 1.8.16 ) on all manually configured hosts ( and it is working good ) but a lot of administration is needed. This fresh install has only one item reference : a VMWare hyperV 5.1 And we trying to extract all the VM machines ( Windows Servers + Redhat 6 Servers ) Now in the environment we have: +- 25 physical machines and +- 400 gest OS's The ame of the test is: to let the zabbix analyze the VMWare environment and automaticly start to monitor a newly created server. ( without intervention. ) PS: we see a lot of problems in the configuration. But we are not finished yet.
        Hide
        richlv added a comment -

        hrm, hardware_full field indeed does not have default value...

        Show
        richlv added a comment - hrm, hardware_full field indeed does not have default value...
        Hide
        Juris Miščenko added a comment -

        Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-7561
        All fields in the "host_inventory" table that cannot have default values now have blank values upon insert.

        Show
        Juris Miščenko added a comment - Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-7561 All fields in the "host_inventory" table that cannot have default values now have blank values upon insert.
        Hide
        Alexander Vladishev added a comment - - edited

        (1) The changes should affect mysql only.
        Juris Miščenko Fields that do not support a DEFAULT value in MySQL are only added to the insertion procedure if the compilation process is performed with MySQL support. RESOLVED.

        Alexander Vladishev CLOSED

        Show
        Alexander Vladishev added a comment - - edited (1) The changes should affect mysql only. Juris Miščenko Fields that do not support a DEFAULT value in MySQL are only added to the insertion procedure if the compilation process is performed with MySQL support. RESOLVED. Alexander Vladishev CLOSED
        Hide
        Alexander Vladishev added a comment - - edited

        (2) Your solution isn't effective. The list of fields and empty values for them can be prepared once outside of a cycle.

        Juris Miščenko Field determination has been moved outside of the general host loop. RESOLVED.

        Alexander Vladishev CLOSED

        Show
        Alexander Vladishev added a comment - - edited (2) Your solution isn't effective. The list of fields and empty values for them can be prepared once outside of a cycle. Juris Miščenko Field determination has been moved outside of the general host loop. RESOLVED. Alexander Vladishev CLOSED
        Hide
        Alexander Vladishev added a comment - - edited

        (3) compilation warning

        lld_host.c: In function ‘DBlld_hosts_save’:
        lld_host.c:1695:35: warning: variable ‘t’ set but not used [-Wunused-but-set-variable]
        

        Alexander Vladishev CLOSED

        Show
        Alexander Vladishev added a comment - - edited (3) compilation warning lld_host.c: In function ‘DBlld_hosts_save’: lld_host.c:1695:35: warning: variable ‘t’ set but not used [-Wunused-but-set-variable] Alexander Vladishev CLOSED
        Hide
        Johannes added a comment - - edited

        is there a possiblity available to implement the change in 2.2.1?

        EDIT: changed sqlmode (mysql 5.5) to '' (to avoid using strict mode) temporary fixed crashes

        Show
        Johannes added a comment - - edited is there a possiblity available to implement the change in 2.2.1? EDIT: changed sqlmode (mysql 5.5) to '' (to avoid using strict mode) temporary fixed crashes
        Hide
        Alexander Vladishev added a comment -

        johansen,

        yes, it is possible to use changes in the development branch for version 2.2.1.

        Show
        Alexander Vladishev added a comment - johansen, yes, it is possible to use changes in the development branch for version 2.2.1.
        Hide
        Alexander Vladishev added a comment - - edited

        Tested. Please review my changes in r41639.

        Juris Miščenko Looks good! CLOSED.

        Show
        Alexander Vladishev added a comment - - edited Tested. Please review my changes in r41639. Juris Miščenko Looks good! CLOSED.
        Hide
        Alexander Vladishev added a comment -

        Fixed in pre-2.2.2 r41946 and pre-2.3.0 (trink) r41947.

        Show
        Alexander Vladishev added a comment - Fixed in pre-2.2.2 r41946 and pre-2.3.0 (trink) r41947.

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert VERBERT
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: