Zone file and corresponding record in named.conf are missed for particular domain

Symptoms
Bind DNS server is used.
There is no entry in named.conf for some domain, there also no zone file for it in %plesk_bin%dns\var folder. If records are created manually they will be removed the next time Plesk updates named.conf.
Cause
There is wrong status in dns_zone table for this domain (it is configured to 2). If DNS for some domain is managed in Plesk Control Panel, the status for this domain in dns_zone table is temporary setting to value 2 (to lock it for any changes) and sets it to 0 value when the transaction is over. If for some reason the transaction is interrupted during DNS
managing (Plesk restarts for example) the status field value is not changed to 0 and stays as 2. Domains with that status value are not recorded in named.conf file during any DNS management.
Resolution
Notes: You are recommended to backup Plesk database before applying described solution.
To run SQL queries you can use dbclient.exe tool.

Check dns_zone records for problem domain (domain.com for example):

Example for MysQL (Jet)

select * from dns_zone where name like 'domain.com';

If there is only one selected record, please change status field from 2 to 0.

Notice, that in case that there are several records, Plesk uses the first of them in numeral order. So it is necessary to check that this id does not belong to another domain and delete it in case it is orphaned:

delete from dns_zone where id=[wrong_record_id]

Otherwise set correct values to all fields.

Please apply following query to DNS zone record which belongs to problem domain:

update dns_zone set status=0 where id=[where id is numerical value
obtained from query 1]

When it’s done update DNS records using dnsmng.exe utility:

cd %plesk_bin%
dnsmng.exe update *

Leave a Comment