Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5262

creating new host: Duplicate entry '11979' for key 'PRIMARY'

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • None
    • 1.8.13
    • Server (S)
    • None

      When I creating a new host error message is generated:

      Error in query [INSERT INTO hosts (hostid, proxy_hostid, host, port, status, useip, dns, ip, disable_until, available,useipmi,ipmi_port,ipmi_authtype,ipmi_privilege,ipmi_username,ipmi_password,ipmi_ip) VALUES (11979,0,'test',10050,0,1,'','1.1.1.1',0,0,0,623,-1,2,'','','')] [Duplicate entry '11979' for key 'PRIMARY']
      DBerror

      In DB there is host under hostid = 11979:

      db-zabbix:zabbix> select * from hosts where hostid = 11979;
      -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

      hostid proxy_hostid host dns useip ip port status disable_until error available errors_from lastaccess inbytes outbytes useipmi ipmi_port ipmi_authtype ipmi_privilege ipmi_username ipmi_password ipmi_disable_until ipmi_available snmp_disable_until snmp_available maintenanceid maintenance_status maintenance_type maintenance_from ipmi_ip ipmi_errors_from snmp_errors_from ipmi_error snmp_error

      -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

      11979 0 h006 h006 1 10.2.96.6 10050 0 0   1 0 0 0 0 0 623 0 2     0 0 0 1 0 0 0 0 127.0.0.1 0 0    

      -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

      When I delete host with hostid 11979 I can add one host without error. Then there is the same error with next hostid.

      Where from zabbix is getting hostid for new hosts?
      Is there any chance I can fix this issue on a production DB?

            Unassigned Unassigned
            rob Robert Jerzak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: