Ad Widget

Collapse

Duplicate entry '632279' for key 'event_recovery.PRIMARY' Zabbix 7.4.11

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nadja
    Junior Member
    • Jul 2026
    • 5

    #1

    Duplicate entry '632279' for key 'event_recovery.PRIMARY' Zabbix 7.4.11


    Good afternoon

    I'm pretty new in the Zabbix-Community and with Zabbix itself. We started using it company-wide about 6 months ago, and we already startet with Version 7.x.x.

    Since about one or two week ago, we startet noticing some problems that wouldn't resolve their status on their own, and they weren't closable (even though I configured it to be closable). After some investigation, we discovered that we startet getting these error messages: Duplicate entry '632279' for key 'event_recovery.PRIMARY' . After even more investigation, we discovered that there was an inconsistency between the mysql tables problem, event_recovery and events.

    Click image for larger version

Name:	image.png
Views:	47
Size:	10.9 KB
ID:	514802

    What seems to happen is the following: Zabbix created a recovery reference for the event 632279 . However, the actual recovery event 632279 was never created in the `events` table. We were able to check the faulty events the following mysql-command:

    Code:
    SELECT p.eventid,p.name
    FROM problem p
    JOIN event_recovery er
    ON p.eventid=er.eventid
    WHERE p.r_eventid IS NULL;
    And delete these after verifying them:

    Code:
    DELETE er
    FROM event_recovery er
    JOIN problem p
    ON p.eventid = er.eventid WHERE p.r_eventid IS NULL;

    But it's still regularly occuring.

    We didn't do a major release upgrade, the only upgrade that happened in the last couple of months was from 7.4.10 to 7.4.11 (since I saw some of these error mesage appearing after a major upgrade).

    What we did however, was we moved the existing Zabbix-instance from the downloadable zabbix-appliance to a Ubuntu-Installation. To do that, we created a dump of the existing tables (because of the configurations, but we removed the data itself). Because the data was way too big to move.

    I found another Thread in this forum stating the same problem, but after a major upgrade: https://www.zabbix.com/forum/zabbix-...covery-primary
    Where he tells the user to re-create these tables and the key-constraints "An online post suggested rebuilding the events_recovery table and re-establishing the association with the primary keys in the events table. "

    Can you maybe help me find the problem we currently have, and resolve it? And wether we should follow this guide above, and if we should, how would that be possible?

    Some Informations:
    Zabbix server version and Zabbix frontend version 7.4.11
    Mysql Server: 8.0.46
    Ubuntu-Server: 24.04.3

    If you need any other informations, feel free to let me know, and thank you for your time.

    Best regards
    Nadja
  • Nadja
    Junior Member
    • Jul 2026
    • 5

    #2
    Good morning

    I just saw that I opened the Question in the wrong section (Zabbix Help instead of Zabbix Troubleshooting and Problems). Can we maybe move it, if that's needed?

    Best regards
    Nadja

    Comment

    Working...