HostOnNet Blog

ISPConfig DNS Error

When i add a DNS zone in ISPConfig, it get added, but domain did not resolve.

When i check the /var/named folder, i see the domain name with .err extension

[root@server named]# ll
total 44
drwxrwx---. 2 named named 4096 Dec 6 00:22 data
drwxrwx---. 2 named named 4096 Nov 30 14:29 dynamic
-rw-r-----. 1 root named 2281 May 22 2017 named.ca
-rw-r-----. 1 root named 152 Dec 15 2009 named.empty
-rw-r-----. 1 root named 152 Jun 21 2007 named.localhost
-rw-r-----. 1 root named 168 Dec 15 2009 named.loopback
-rw-r--r-- 1 named named 804 Dec 7 01:40 pri.furu-anime.com.err
-rw-r--r-- 1 named named 715 Dec 6 23:30 pri.hosthat.com.err
-rw-r--r-- 1 named named 745 Dec 7 01:52 pri.vps7.ovh.err
drwxrws---. 2 named named 4096 Dec 6 00:23 slave
drwxrwx---. 2 named named 4096 Nov 30 14:29 slaves
[root@server named]#

This is because ISPConfig check DNS zones with named-checkzone command. If it fail the check, it do not add the DNS zone, instead save the domain with .err extension.

[root@server named]# named-checkzone furu-anime.com /var/named/pri.furu-anime.com.err
zone furu-anime.com/IN: NS 'ns1.furu-anime.com' has no address records (A or AAAA)
zone furu-anime.com/IN: NS 'ns2.furu-anime.com' has no address records (A or AAAA)
zone furu-anime.com/IN: not loaded due to errors.
[root@server named]#

This in cause the DNS Zone file is missing entry for

ns1.furu-anime.com
ns2.furu-anime.com

To fix the problem, Go add A records for ns1 and ns2 in ISPConfig.

This happens when you add a domain name, that use its own name servers like ns1.yourdomain.com and ns2.yourdomain.com

Once you update DNS entry in ISPConfig, it take few minutes for DNS Zone to to recreate. This is done by cronjob, that run every minute.

[root@server ~]# crontab -l
* * * * * /usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
* * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
[root@server ~]#

Once the error is fixed, zones file get named properly.

[root@server ~]# ls -l /var/named
total 44
drwxrwx---. 2 named named 4096 Dec 6 00:22 data
drwxrwx---. 2 named named 4096 Nov 30 14:29 dynamic
-rw-r-----. 1 root named 2281 May 22 2017 named.ca
-rw-r-----. 1 root named 152 Dec 15 2009 named.empty
-rw-r-----. 1 root named 152 Jun 21 2007 named.localhost
-rw-r-----. 1 root named 168 Dec 15 2009 named.loopback
-rw-r--r-- 1 named named 804 Dec 7 01:40 pri.furu-anime.com
-rw-r--r-- 1 named named 715 Dec 6 23:30 pri.hosthat.com.err
-rw-r--r-- 1 named named 745 Dec 7 01:52 pri.vps7.ovh
drwxrws---. 2 named named 4096 Dec 6 00:23 slave
drwxrwx---. 2 named named 4096 Nov 30 14:29 slaves
[root@server ~]#

See ISPConfig


Posted in Linux