When I try to restart / start the named service, it keeps failing.

service named restart

Results in:-

Stopping named:                                            [  OK  ]
Starting named:
Error in named configuration:
/etc/named.conf:2: missing ';' before '}'

service named start

Results in:-

Starting named:
Error in named configuration:
/etc/named.conf:2: missing ';' before '}'

The thing is, even if named.conf contains no syntax errors or even if the file doesn't exist at all, I'm still getting this error preventing me from starting the service.

Currently trying with a named.conf containing the following:-

options {
listen-on port 53 {; };

And checking the syntax of named.conf using

named-checkconf /etc/named.conf

Results in no errors. Yet when starting the service, I still get the above error.

I can't see any other errors in the logs relating to this and don't really know where to get to the bottom of this. Any ideas?

(Even reverting back to the named.conf file that was in place before I stopped the service returns the same error now and this was previously running fine).

Contents on init.d/named can be seen at this pastebin.

CentOS 6.4 - Linux version 2.6.32-358.6.2.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Thu May 16 20:59:36 UTC 2013


bash -x /etc/init.d/named start

Snippet from results possibly of relevance?

+ echo 'Error in named configuration:'
Error in named configuration:
+ echo '/etc/named.conf:2: missing '\'';'\'' before '\''}'\'''
/etc/named.conf:2: missing ';' before '}'
+ failure
+ local rc=0
+ '[' color '!=' verbose -a -z '' ']'
+ echo_failure
+ '[' color = color ']'
+ echo -en '\033[60G'
                                                           + echo -n '['
[+ '[' color = color ']'
+ echo -en '\033[0;31m'
+ echo -n FAILED
FAILED+ '[' color = color ']'
+ echo -en '\033[0;39m'
+ echo -n ']'
]+ echo -ne '\r'
+ return 1
+ '[' -x /bin/plymouth ']'
+ /bin/plymouth --details
+ return 0
+ echo
  • have you watch the script that probably exists in /etc/init.d/named ? the errors probably come from there
    – Kiwy
    Mar 11, 2014 at 11:19
  • Even though it specifically states /etc/named.conf file? (I've run a named-checkconfig on /etc/init.d/named as well but nothing flagged that would prevent service from starting). Thanks.
    – zigojacko
    Mar 11, 2014 at 11:24
  • 1
    @GeoffJackson-zigojacko yes, the service command does not execute /etc/named.conf it probably executes /etc/init.d/named, and that you cannot check with named-checkconf as it is not a named config file.
    – Anthon
    Mar 11, 2014 at 11:31
  • 1
    @GeoffJackson-zigojacko what is your distribution? (Add a tag to the question).
    – Anthon
    Mar 11, 2014 at 11:32
  • I see, thanks @Anthon (distro CentOS 6.4 - full version added above). What would be the process to check for issues in /etc/init.d/named please?
    – zigojacko
    Mar 11, 2014 at 11:39

2 Answers 2


Okay, so I managed to resolve this by changing one line in /etc/init.d/named:-

Line 29 in /etc/init.d/named changed from...



named='named -u named'

Then service would start back up again without issue. Nothing like a misleading error message!


  • it's nice that you find a solution.
    – Kiwy
    Mar 11, 2014 at 12:41

When I had the following issue then we checked the two lines.

-bash-4.1# service named start
Starting named: 
Error in named configuration:
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone loaded serial 0
zone loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0
dns_master_load: acme.co.za.hosts:337: unexpected end of line
dns_master_load: acme.co.za.hosts:336: unexpected end of input
zone inet.co.za/IN: loading from master file acme.co.za.hosts failed: unexpected end of input
zone inet.co.za/IN: not loaded due to errors.
_default/acme.co.za/IN: unexpected end of input

I fixed up the entry for the dns_master_load: acme.co.za.hosts:337: unexpected end of line. It was missing the IP address.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .