Archive

Archive for July, 2009

Plesk for Windows not creating DNS zones

July 22nd, 2009 No comments

For only the third time in many years, we came across an odd problem where in earlier versions of Plesk (8.2 and 8.3) when a domain is removed and recreated, the DNS zone file is not created.  Apparently this is due to a setting in the Plesk database for that domain name.  Here is what Parallels told me the fix was:

============================================
I resolved the issue by the following way:

C:\Program Files\SWsoft\Plesk\admin\bin>dbclient --direct-sql --sql="select * from dns_zone where name like '%domain.com%'";
id name displayName email status type ttl ttl_unit refresh refresh_unit retry retry_unit expire expire_unit minimum minimum_unit
106 domain.com domain.com xxxx@xxxxx.com 2 master 86400 86400 10800 3600 3600 3600 604800 86400 10800 3600
107 domain.com domain.com xxxx@xxxxx.com 0 master 86400 86400 10800 3600 3600 3600 604800 86400 10800 3600

You see the status equals 2 – 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.

C:\Program Files\SWsoft\Plesk\admin\bin>dbclient –direct-sql –sql=”select * from domains where name like ‘%domain.com%'”;
id cr_date name displayName dns_zone_id status htype real_size cl_id cert_rep_id limits_id params_id guid
105 2009-07-20 00:00:00 domain.com domain.com 107 0 vrt_hst 4326014 80 0 588 0 35CB0512-FFA9-48
12-B238-F8DA98A7ECFF

C:\Program Files\SWsoft\Plesk\admin\bin>dbclient –direct-sql –sql=”select * from domains where dns_zone_id=106″;
id cr_date name displayName dns_zone_id status htype real_size cl_id cert_rep_id limits_id params_id guid

C:\Program Files\SWsoft\Plesk\admin\bin>dbclient –direct-sql –sql=”delete from dns_zone where id=106″;
C:\Program Files\SWsoft\Plesk\admin\bin>dnsmng.exe update *

Named.conf file was updated:
zone “domain.com” {
type master;
file “C:\Program Files\SWsoft\Plesk\dns\var\domain.com”;
allow-transfer {
common-allow-transfer;
xx.xx.xx.xx;
xx.xx.xx.xx;
xx.xx.xx.xx;
};
};

and corresponding zone file was created.
============================================

In usual Parallels fashion, this is a little hard to follow, but basically, it looks like there were two entries for the domain in the Plesk database.  The initial one that has a status of 2 and the newer one with the status of 0.  They removed the db entry that had the status of 2 and forced a DNS update which then got the DNS zone properly created.

I imagine there are going to be variations on the theme here, but in the end, look for the domain having a status of 2 and either edit that record using sql queries, or if its a duplicate record, remove it.

Categories: Server Administration Tags: , , ,

site tracking with Asynchronous Google Analytics plugin for Multisite by WordPress Expert at Web Design Jakarta.