[ZBX-7470] Zabbix Server stopped with "[Z3005] query failed: [1062] Duplicate entry" Created: 2013 Dec 02  Updated: 2017 May 30  Resolved: 2016 Sep 02

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.2.0
Fix Version/s: None

Type: Incident report Priority: Critical
Reporter: Yuya Kusakabe Assignee: Unassigned
Resolution: Won't fix Votes: 1
Labels: server, vmware
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix 2.2.0
MySQL 5.6.14
Ubuntu12.04


Attachments: File objdump.gz     File zabbix_server.log.1.gz     File zabbix_server.log.2.gz     File zabbix_server.log.3.gz     File zabbix_server.log.4.gz     File zabbix_server.log.5.gz     File zabbix_server.log.6.gz     File zabbix_server.log.7.gz     File zabbix_server.log.gz    

 Description   

Zabbix Server stopped with "[Z3005] query failed: [1062] Duplicate entry".

This error logs is in attached file, "zabbix_server.log.1.gz".

And I attach the objdump and debug log, "zabbix_server.log.gz".



 Comments   
Comment by Bouygues Telecom [ 2014 Feb 18 ]

We had a similar problem on our proxies using MySQL :

20127:20140218:104924.341 Received configuration data from server. Datalen 14475347
20127:20140218:104926.241 [Z3005] query failed: [1062] Duplicate entry '11694-net.if.in[isatap.BT0D0000.w2k.bouyguestelecom.fr]' for key 'items_1' [update items set status=0 where itemid=261523;
20127:20140218:104926.486 [Z3005] query failed: [1062] Duplicate entry '13139-net.if.in[isatap.BT0D0000.w2k.bouyguestelecom.fr]' for key 'items_1' [update items set status=3 where itemid=416551;
20127:20140218:104926.508 [Z3005] query failed: [1062] Duplicate entry '11887-custom.process[CTIADM,cpu]' for key 'items_1' [insert into items (itemid,type,snmp_community,snmp_oid,hostid,key_,delay,status,value_type,trapper_hosts,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authpassphrase,snmpv3_privpassphrase,formula,logtimefmt,delay_flex,params,ipmi_sensor,data_type,authtype,username,password,publickey,privatekey,flags,filter,interfaceid,port) values (1221282,7,'','',11887,'custom.process[CTIADM,cpu]',300,3,0,'','',0,'','','1','','','','',0,0,'','','','',4,'',null,'');
20127:20140218:104926.680 failed to update local proxy configuration copy: database error

queries failed -> database error, but proxies don't stop working
It seems its always the same few items that appear to cause duplicate entries.

Comment by Alexander Vladishev [ 2016 Sep 02 ]

Your database is not configured as case-sensitive. You need use utf8_bin collate instead of *_ci.

To solve the issue you need to execute it for each table:
ALTER TABLE <table_name> CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin

Comment by Alexander Vladishev [ 2016 Sep 02 ]

I close the issue as Won't Fix.

Generated at Fri Mar 29 16:02:20 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.