DNS page in Plesk shows an exception: Table::select() failed: no such row in the table

Refers to:

  • Plesk 11.5 for Windows
  • Plesk
  • MT:234ea1b9d7c943fa35fffc7eb3e7cab2
  • MG:45158a7b7a7328ab7ea4baab33289e24
  • MT:bb058b0e02e38ad4916b120dac51c796

Created:

2016-11-16 12:57:35 UTC

Modified:

2017-02-13 06:36:02 UTC

0

Was this article helpful?


Have more questions?

Submit a request

DNS page in Plesk shows an exception: Table::select() failed: no such row in the table

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:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa  > FILE_NAME.sql

Windows:

    "%plesk_dir%"\\Mysql\\bin\\mysqldump.exe -uadmin -p<plesk_admin_password> -P8306 psa > backup_name.sql
  1. Log in to Plesk database:

Linux:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa

Windows:

    "%plesk_dir%"\\Mysql\\bin\\mysql.exe -uadmin -p<plesk_admin_password> -P8306 psa
  1. 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;
  2. 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');
  3. Determine the new zone ID:

    mysql>  SELECT id, name FROM dns_zone where name='example.com';
  4. Substitute dns_zone_id in domains table with the correct value obtained from the previous step: сф mysql> UPDATE domains SET dns_zone_id=' ' WHERE name='example.com';

  5. For each affected domain, go to Home > Domains > example.com > Website & Domains > DNS and use Default button to regenerate the DNS records.

Have more questions? Submit a request
Please sign in to leave a comment.