[ZBX-7561] [Z3005] query failed: [1364] Field 'hardware_full' doesn't have a default value [insert into host_inventory (hostid,inventory_mode) values Created: 2013 Dec 18  Updated: 2017 May 30  Resolved: 2014 Jan 09

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.2.0
Fix Version/s: 2.2.2rc1, 2.3.0

Type: Incident report Priority: Major
Reporter: Robert VERBERT Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: dbpatches, inventory
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
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 )



 Comments   
Comment by richlv [ 2013 Dec 18 ]

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

Comment by Robert VERBERT [ 2013 Dec 18 ]

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.

Comment by richlv [ 2013 Dec 18 ]

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

Comment by Juris Miščenko (Inactive) [ 2014 Jan 03 ]

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.

Comment by Alexander Vladishev [ 2014 Jan 09 ]

(1) The changes should affect mysql only.
jurism 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.

sasha CLOSED

Comment by Alexander Vladishev [ 2014 Jan 09 ]

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

jurism Field determination has been moved outside of the general host loop. RESOLVED.

sasha CLOSED

Comment by Alexander Vladishev [ 2014 Jan 14 ]

(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]

sasha CLOSED

Comment by Johannes [ 2014 Jan 15 ]

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

Comment by Alexander Vladishev [ 2014 Jan 18 ]

johansen,

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

Comment by Alexander Vladishev [ 2014 Jan 18 ]

Tested. Please review my changes in r41639.

jurism Looks good! CLOSED.

Comment by Alexander Vladishev [ 2014 Jan 29 ]

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

Generated at Thu Mar 28 20:39:36 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.