[ZBX-17045] Error while delete host Created: 2019 Dec 06  Updated: 2019 Dec 06  Resolved: 2019 Dec 06

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F), Server (S)
Affects Version/s: 4.4.3
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Alex Alexandrov (Inactive) Assignee: Zabbix Support Team
Resolution: Won't fix Votes: 0
Labels: frontend, host
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File debug_output.txt     PNG File image-2019-12-06-08-27-29-692.png    

 Description   

I removed from host all items, triggers, graphs and so on.

But when i try to delete this host I get this error in Web UI:

Cannot delete host
- Error in query [DELETE FROM hosts WHERE hostid='10417'] [Cannot delete or update a parent row: a foreign key constraint fails (`zabbix`.`items`, CONSTRAINT `c_items_4` FOREIGN KEY (`interfaceid`) REFERENCES `interface` (`interfaceid`))]
- SQL statement execution has failed "DELETE FROM hosts WHERE hostid='10417'" [hosts.php:823 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->delete() → DB::delete() → DB::exception() in include/classes/db/DB.php:847]

Debug information in file debug_output.txt

Expected:
Succesfully delete the host.


Generated at Fri May 09 07:44:52 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.