Symptoms
- Unable to manage domain or a customer (suspend/resume/remove, etc.);
 - Unable to manage hosting settings;
 - Unable to access DNS Settings menu:
Error: DNSZone::Table::select() failed: no such row in the table - Plesk domains are added in HSPcomplete, but the DNS zones are not created in the HSPcomplete name servers automatically.
 
The complete error looks like this:
ERROR: PleskException
Table::select() failed: no such row in the table
0: /usr/local/psa/admin/plib/dns/DNSZone.php:52
    DNSZone->DNSZone(string '100')
1: /usr/local/psa/admin/plib/common_func.php3:2610
    objectMaker(string 'DNSZone', string '100')
2: /usr/local/psa/admin/plib/dns/DNSManager.php:39
    DNSManager::getDNSZone(string '100')
3: /usr/local/psa/admin/htdocs/domains/dns.php:21
Cause
Database inconsistency: dns_zone_id record in domains table points to a non-existent ID record in the dns_zone table for one or several domains.
Resolution
- Make 
psadatabase backup:Linux:# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > FILE_NAME.sqlWindows:
"%plesk_dir%"\Mysql\bin\mysqldump.exe -uadmin -p<plesk_admin_password> -P8306 psa > backup_name.sql - Log in to Plesk database:Linux:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -psaWindows:
"%plesk_dir%"\Mysql\bin\mysql.exe -uadmin -p<plesk_admin_password> -P8306 psa - Find affected domains that have missing IDs:
mysql> SELECT d.name FROM domains d LEFT JOIN dns_zone z ON d.dns_zone_id=z.id WHERE z.id IS NULL; - For each reported domain, create appropriate zone in the 
dns_zonetable: mysql> INSERT INTO dns_zone (name, displayName, email) VALUES (‘example.com’, ‘example.com’, ‘admin@example.com’); - Determine the new zone ID:
mysql> SELECT id, name FROM dns_zone where name='example.com'; - Substitute 
dns_zone_idindomainstable with the correct value obtained from the previous step:mysql> UPDATE domains SET dns_zone_id='<DNS-ZONE-ID>' WHERE name='example.com'; - For each affected domain, go to Home > Domains > example.com > Website & Domains > DNS and use Default button to regenerate the DNS records.
 

						