Symptoms

  1. Unable to manage domain or a customer (suspend/resume/remove, etc.);
  2. Unable to manage hosting settings;
  3. Unable to access DNS Settings menu:
    Error: DNSZone::Table::select() failed: no such row in the table
    
  4. 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

  1. Make psa database backup:Linux:
    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > FILE_NAME.sql
    

    Windows:

    "%plesk_dir%"\Mysql\bin\mysqldump.exe -uadmin -p<plesk_admin_password> -P8306 psa > backup_name.sql
    
  2. Log in to Plesk database:Linux:
    # mysql -uadmin -p`cat /etc/psa/.psa.shadow` -psa
    

    Windows:

    "%plesk_dir%"\Mysql\bin\mysql.exe -uadmin -p<plesk_admin_password> -P8306 psa
    
  3. 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;
    
  4. For each reported domain, create appropriate zone in the dns_zone table: mysql> INSERT INTO dns_zone (name, displayName, email) VALUES (‘example.com’, ‘example.com’, ‘admin@example.com’);
  5. Determine the new zone ID:
    mysql>  SELECT id, name FROM dns_zone where name='example.com';
    
  6. Substitute dns_zone_id in domains table with the correct value obtained from the previous step:
    mysql> UPDATE domains SET dns_zone_id='<DNS-ZONE-ID>' WHERE name='example.com';
    
  7. For each affected domain, go to Home > Domains > example.com > Website & Domains > DNS and use Default button to regenerate the DNS records.

Leave a Reply

Your email address will not be published. Required fields are marked *