Hello,
When I try to delete a host, it fails.
As I managed to delete a host with the ICMP ping template, I suppose it only happens on hosts with discovered items.
Also, when I try to "unlink and clear" on a host, a similar error appears. I can only "unlink" the template without purging the data.
I am certain that it worked before upgrading to version 7 (from 6.4). I suppose I could get around it with some messy SQL queries, but that would only be treating the symptoms.
Is this a known issue? The result of a bad upgrade?
Thank you,
When I try to delete a host, it fails.
Code:
pg_query(): Query failed: ERROR: update or delete on table "items" violates foreign key constraint "c_item_discovery_3" on table "item_discovery" DETAIL: Key (itemid)=(83660) is still referenced from table "item_discovery". [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerHostMassDelete->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->delete() → CHost::deleteForce() → CDiscoveryRule::deleteForce() → DB::delete() → DB::deleteByPkIds() → DB::deleteByIdField() → DBexecute() → pg_query() in include/db.inc.php:255] Error in query [DELETE FROM items WHERE itemid=83660] [ERROR: update or delete on table "items" violates foreign key constraint "c_item_discovery_3" on table "item_discovery" DETAIL: Key (itemid)=(83660) is still referenced from table "item_discovery". SQL statement execution has failed "DELETE FROM items WHERE itemid=83660"
Also, when I try to "unlink and clear" on a host, a similar error appears. I can only "unlink" the template without purging the data.
I am certain that it worked before upgrading to version 7 (from 6.4). I suppose I could get around it with some messy SQL queries, but that would only be treating the symptoms.
Is this a known issue? The result of a bad upgrade?
- Debian 13 ;
- PostgreSQL 17 ;
- Zabbix 7.4.6, installed via apt through the official repositories.
Thank you,
Comment