Search Engine: Elastic

Article ID: 123390, created on Nov 4, 2014, last review on Dec 23, 2015

  • Applies to:
  • Plesk Automation 11.5

Symptoms

  1. An operation fails with this error:

    Task 'Update named dns2.ppa.tld(5)' (id=262092) execution failed. Foreign key 'domain_hosting_bindings_fk3' violation while executing ' DELETE FROM domains WHERE deleted = 'y' AND NOT EXISTS (SELECT 1 FROM dns_resource_records r WHERE domains.domain_id = r.domain_id) '
    

    1.1. In /usr/local/ppa/log/poa.debug.log, the following is displayed:

    task:262109] ' DELETE FROM domains WHERE deleted = 'y' AND NOT EXISTS (SELECT 1 FROM dns_resource_records r WHERE  domains.domain_id = r.domain_id) '
                    [txn:994404 task:262109 DBS::checkSQLError] Diagnostic info about SQL error: sqlreturn=0 state=HY000, nativeCode=7, description=ERROR:  update or delete on table "domains" violates foreign key constraint "domain_hosting_bindings_fk3" on table "domain_hosting_bindings"; 
    
  2. Cannot create the webspace. The following error displays:

    Module: "db_service", code = "120" Properties: sqlcode = "23001", reason = "ERROR: update or delete on table "domains" violates foreign key constraint "domain_hosting_bindings_fk3" on table "domain_hosting_bindings"; Error while executing the query", action = " DELETE FROM domains WHERE deleted = 'y' AND NOT EXISTS (SELECT 1 FROM dns_resource_records r WHERE domains.domain_id = r.domain_id) ", constraint = "domain_hosting_bindings_fk3". Message: "Foreign key 'domain_hosting_bindings_fk3' violation while executing ' DELETE FROM domains WHERE deleted = 'y' AND NOT EXISTS (SELECT 1 FROM dns_resource_records r WHERE domains.domain_id = r.domain_id) '.".
    

Cause

This issue took place because one of the domains has been incorrectly removed (or tasks were canceled), causing an inconsistency in the database. There are orphan records in the database that prevent the task from executing.

Resolution

Contact Odin Technical Support:

To create a request: http://www.odin.com/support/request/

For chat support: http://www.odin.com/support/chat/

33a70544d00d562bbc5b17762c4ed2b3 caea8340e2d186a540518d08602aa065 e0aff7830fa22f92062ee4db78133079

Email subscription for changes to this article
Save as PDF