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

Removing / Updating host status by LLD is failing on Oracle DB due to error: [Z3008] query failed due to primary key constraint

XMLWordPrintable

    • Sprint candidates

      Steps to reproduce:

      Precondition: setup Zabbix with Oracle DB

      1. Create host with trapper discovery rule and host prototype, set Remove lost resources =7d, Disable lost resources = Immediately
      2. Send data to trapper to discover host
      3. Observe that host is created
      4. Send data to trapper to undiscover the host

      Result:
      Hosts are not updated by LLD, error in the server log:

      15047:20250715:104356.775 [Z3008] query failed due to primary key constraint: [-1] ORA-00933: SQL command not properly ended
       15047:20250715:104356.775 query [update host_discovery set ts_delete=1753169981 where hostid=10816;.update host_discovery set ts_disable=1 where hostid=10816;.update host_discovery set ts_delete=1753169981 where hostid=10817;.update host_discovery set ts_disable=1 where hostid=10817;.update host_discovery set ts_delete=1753169981 where hostid=10818;.update host_discovery set ts_disable=1 where hostid=10818;.update host_discovery set ts_delete=1753169981 where hostid=10819;.update host_discovery set ts_disable=1 where hostid=10819;.update host_discovery set ts_delete=1753169981 where hostid=10820;.update host_discovery set ts_disable=1 where hostid=10820;.update host_discovery set ts_delete=1753169981 where hostid=10821;.update host_discovery set ts_disable=1 where hostid=10821;.update host_discovery set ts_delete=1753169981 where hostid=10822;.update host_discovery set ts_disable=1 where hostid=10822;.update host_discovery set ts_delete=1753169981 where hostid=10823;.update host_discovery set ts_disable=1 where hostid=10823;.update host_discovery set ts_delete=1753169981 where hostid=10824;.update host_discovery set ts_disable=1 where hostid=10824;.update host_discovery set status=1 where hostid between 10816 and 10824] failed, setting transaction as failed
       15047:20250715:104356.775 ignoring query [txnlev:1] [update host_discovery set disable_source=1 where hostid between 10816 and 10824] within failed transaction
       15047:20250715:104356.775 ignoring query [txnlev:1] [begin.update hosts set status=1 where hostid between 10816 and 10824;.end;] within failed transaction
       15047:20250715:104356.775 commit called on failed transaction, doing a rollback instead
       15047:20250715:104356.777 End of lld_update_hosts()
      
      

      Expected:
      LLD should update the host status and delete lost resources after configured amount of time.

            zabbix.dev Zabbix Development Team
            ngogolevs Nikita Gogolevs
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 1.5h
                1.5h