mojamoi

Well-Known Member
Jul 23, 2007
186
0
66
I get errors restarting named

[[email protected] named]# vi ourlinuxtutorials.com.db
[[email protected] named]# service named restart
Stopping named: [ OK ]
Starting named:
Error in named configuration:
dns_master_load: ourlinuxtutorials.com.db:1: extra input text
zone ourilinuxtutorials.com/IN: loading from master file ourlinuxtutorials.com.db failed: extra input text
zone ourilinuxtutorials.com/IN: not loaded due to errors.
_default/ourilinuxtutorials.com/IN: extra input text
zone 61.34.192.in-addr.arpa/IN: loaded serial 0
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0
[FAILED]




here is forward zone file

[[email protected] named]# cat ourlinuxtutorials.com.db
$TTL 1D 86400
@ IN SOA m6.ourlinuxtutorials.com. root.m6.ourlinuxtutorials.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS m6.ourlinuxtutorials.com.
IN A 127.0.0.1
m6 IN A 192.34.61.117
 

Greenhost

Well-Known Member
Jan 22, 2013
92
0
6
cPanel Access Level
Root Administrator
You can use a tool called named- checkconf to check BIND dns server (named daemon) configuration file. It checks the syntax, but not the semantics, of a named configuration file i.e. it can check for syntax errors or typographical errors but cannot check for wrong MX / A address assigned by you. Nevertheless, this is an excllent tool for troubleshooting DNS server related problems.

How to do check your bind configuration for errors:

Simply run command as follows:
Code:
# named-checkconf /etc/named.conf
You may want to chroot to directory so that include directives in the configuration file are processed as if run by a similarly chrooted named:
Code:
# named-checkconf -t /var/named/chroot /etc/named.conf
If there is no output, the configuration is considered correct and you can safely restart or reload bind configuration file. If there is an error it will be displayed on screen:
Code:
# named-checkconf /etc/named.conf
Output:
Code:
/etc/named.conf:58: open: /etc/named.root.hints: file not found