[ZBX-15926] Errors in posgresql log: duplicate key value violates unique constraint "hosts_groups_1" Created: 2019 Apr 02  Updated: 2024 Apr 10  Resolved: 2019 Apr 09

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

Type: Problem report Priority: Major
Reporter: Edmunds Vesmanis Assignee: Vladislavs Sokurenko
Resolution: Duplicate Votes: 0
Labels: lld
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File postgresql-9.5-main.log     Zip Archive zabbix_server.log.zip    
Issue Links:
Duplicate
duplicates ZBX-14635 host discovery fails after manual mov... Closed
Team: Team A
Sprint: Sprint 51 (Apr 2019)
Story Points: 1

 Description   

errors in postgresql log of our zabbix infrastructure:

ERROR:  duplicate key value violates unique constraint "hosts_groups_1"
DETAIL:  Key (hostid, groupid)=(12541, 416) already exists.
STATEMENT:  insert into hosts_groups (hostgroupid,hostid,groupid) values (28267,12541,416),(28268,12542,416),(28269,12543,416);

the groupid 416 is a simple group used for esxi. hostid 12541, 12542 and 12543 are hosts discovered by the vmware template.



 Comments   
Comment by Vladislavs Sokurenko [ 2019 Apr 02 ]

Could you please provide zabbix server log ?

Comment by GUEDIDER Karim [ 2019 Apr 03 ]

Hi dear support,

Find in attach the expected logs files.

regards

Support AIT

Comment by GUEDIDER Karim [ 2019 Apr 03 ]

zabbix_server.log.zip

Comment by Vladislavs Sokurenko [ 2019 Apr 03 ]

Please provide version information also, it could be ZBX-14635

Comment by GUEDIDER Karim [ 2019 Apr 03 ]

Hi,

Version is Zabbix 3.4.7

Regards

Support AIT

Comment by Vladislavs Sokurenko [ 2019 Apr 03 ]

OK, closing as a duplicate of ZBX-14635

Comment by GUEDIDER Karim [ 2019 Apr 03 ]

Thanks,

Just waiting for your return.

Regards

Support AIT

Comment by GUEDIDER Karim [ 2019 Apr 04 ]

Hi dear support,

Can we get news regarding this case?

Support AIT

 

Comment by Viktors Tjarve [ 2019 Apr 04 ]

Hi,
This issue has been fixed in ticket ZBX-14635. The fix was released in versions 3.0.24rc1, 4.0.2rc1 and 4.2.0alpha1.
To resolve your case you have to upgrade to version 4.0.2 or later. Zabbix version 3.4 is no longer officially supported.
Kind Regards

Comment by Vladislavs Sokurenko [ 2019 Apr 04 ]

Hi humanis.zabbix.support,

Our support will contact you soon

Regards
Vladislavs

Comment by Vladislavs Boborikins (Inactive) [ 2019 Apr 04 ]

Please note that your version of Zabbix is no longer supported (for details please see https://www.zabbix.com/life_cycle_and_release_policy), therefore we recommend upgrading to the latest LTS version. We will still assist you with troubleshooting this issue, but please be advised that newer versions have several improvements you can benefit from.

Generated at Fri Apr 04 20:22:01 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.