SYMPTOMS
Symptoms may differ, for example:- when Plesk domains are added in HSPcomplete, the DNS zones are not created in the HSPcomplete name servers automatically.
- when domain is deleted in Plesk, it is not deleted completely but Exception is shown.
- when you create a domain, hosting is not created but error is shown.
Full error looks as:
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
The error reason is that in psa.domains Plesk mysql table dns_zone_id record points to inexistent id record in psa.dns_zone table for one or several domains. It may happen because of Plesk internal issues, broken database, incomplete domain deletion, wrong provisioning from HSPcomplere to Plesk server or similar.RESOLUTION
You need to create appropriate zone back in psa.dns_zone table first. Log into mysql server console:# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa and find domains which have missed ID:
mysql> SELECT d.name FROM domains d LEFT JOIN dns_zone z ON d.dns_zone_id=z.id WHERE z.id IS NULL; Then for each reported domain do the following:
1. create appropriate id records with following commands, do not forget to replace DOMAN-NAME with a real domain name and ADMIN-EMAIL with a correct email:
mysql> INSERT INTO dns_zone SET name='DOMAIN-NAME', displayName='DOMAIN-NAME', email='ADMIN-EMAIL'; 2. know new zone ID:
mysql> SELECT id, name FROM dns_zone where name='DOMAIN-NAME'; 3. substitute correct ID into psa.domains table, don't forget to replace DOMAN-NAME and DNS-ZONE-ID with correct values:
mysql> UPDATE domains SET dns_zone_id='DNS-ZONE-ID' WHERE name='DOMAIN-NAME'; Then log into Plesk panel, for each corrected domain go to domain.com > DNS and use Default button to re-generate DNS records. After this the error disappear. Now you will be able to repeat the action which was interrupted by the error - do domain deletion or syncronize DNS DNS to HSPcomplete or other..
NOTE: It is highly recommended to have Plesk components be updated to the latest available builds, which have fixes included that prevent such problem in several cases.