[ZBX-8612] duplicate hosts may be created when using auto-registration via a proxy Created: 2014 Aug 13 Updated: 2025 Mar 21 |
|
Status: | Confirmed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.2.5 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Oleg Ivanivskyi | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 3 |
Labels: | autoregistration | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Zabbix server |
Attachments: |
![]() ![]() ![]() ![]() ![]() |
||||
Issue Links: |
|
Description |
How to reproduce: |
Comments |
Comment by Oleg Ivanivskyi [ 2014 Aug 13 ] |
Duplicates could be created also. How to reproduce: Note, that agent is installed on the proxy server. |
Comment by Oleksii Zagorskyi [ 2014 Aug 13 ] |
I'm not sure this is a bug. Note that in |
Comment by Oleg Ivanivskyi [ 2014 Aug 13 ] |
Thanks for the details. You're right. The bug is that Zabbix may create duplicates. |
Comment by Alexander Vladishev [ 2014 Aug 22 ] |
Similar issue: ZBX-4973 |
Comment by Juris Miščenko (Inactive) [ 2014 Aug 22 ] |
This bug manifests itself when two, very closely timed, connections are made to the servers trappers - one from the host and the other from the proxy. When the two trapper processes query the database for information regarding the host, they both receive empty results, as the host does not exist at that point, both processes proceed with adding the host and thus the host is duplicated, once as monitored via a proxy and a second time where it's monitored directly. Unfortunately, for the time being, we cannot correct this. A possible solution would be setting a lock on the database before reading it and releasing it after the entry has been added, so that during the registration, the other process has to wait for the database to become available for reading where it will discover the entry added by the first process and will modify it rather than add its own entry. The downside of this is a very severe execution time penalty as concurrent operations, on at least the table, will become impossible. The issue noted by Alexander addresses this same bug on the API side where it is possible for this to occur when there is a request to add an entry to the database by two separate connections. An effort at mitigation is being discussed. |
Comment by Juan Pablo [ 2022 Jul 05 ] |
I can confirm that this still happen on version 6.0.6. I understand that is difficult to solve but meanwhile is there any query or utility to find this duplicates? something like this https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/46895-autodiscovery-duplicate-hosts but inside zabbix, like housekeeper or something like that |