Find the answer to your Linux question:
Results 1 to 8 of 8
When trying to start named I receive the following error : named failed. The error was: Starting named: Error in named configuration: /etc/named.root/hints:2: '}' expected near ';' [FAILED] The heck ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2007
    Posts
    3

    Bind 9 named.root.hints mystery


    When trying to start named I receive the following error :

    named failed. The error was: Starting named: Error in named configuration:
    /etc/named.root/hints:2: '}' expected near ';' [FAILED]

    The heck of it is the file was generated by running "dig ai.root-server.net . ns >named.root.hints" So I don't understand why there is an error in the file.


    Thanks for your help.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    This error has nothing to do with the file but with named.conf.

    Check to ensure that all your brackets are closed.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Nov 2007
    Posts
    3
    Thanks. I copied the sample file named.conf and did not edit it at all and got the same results. Fedora 8 bind-9.5.0 samples copied from /usr/share/docs/bind-9.5.0/sample/etc. I am at a loss but will review the sample file line by line for brackets

    Thansk again

  4. #4
    Just Joined!
    Join Date
    Nov 2007
    Posts
    3
    WOW the sample file is just plain WRONG. I fixed to suit me and bang no more error. I am sorry for doubhting that it could be that simple and thanks so much for your help.

  5. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    You are welcome. If you are subscribed to the Fedora mailing list you might want to give them a heads-up on the issue.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #6
    Just Joined!
    Join Date
    Mar 2008
    Posts
    5

    Unhappy Same Error, no missing brackets in named.conf ???

    Sorry to bring up an old post, but I am getting the same error when trying to start named. I have searched the web and found only this post. Furthermore, I have visually checked my named.conf a hundred times now, and don't think I have any missing brackets. Please review my configs and tell me if I've missed something!

    Here is the error:

    ================================================== =====
    [root@my-server named]# service named start
    Starting named:
    Error in named configuration:
    /etc/named/named.root:1: '}' expected near ';'
    [FAILED]
    ================================================== =====

    Here are my packages:

    ================================================== =====
    [root@my-server named]# rpm -qa | grep bind
    bind-utils-9.3.4-6.0.2.P1.el5_2
    bind-9.3.4-6.0.2.P1.el5_2
    bind-libs-9.3.4-6.0.2.P1.el5_2
    ================================================== =====

    My named.conf (anonymized personal info):

    ================================================== =====
    options {
    listen-on port 53 {
    127.0.0.1;
    };
    listen-on port 53 {
    1.2.3.4;
    };
    directory "/var/named";
    dump-file "/var/named/data/cache_dump.db";
    statistics-file "/var/named/data/named_stats.txt";
    memstatistics-file "/var/named/data/named_mem_stats.txt";
    allow-query {
    localhost;
    };
    };
    logging {
    channel default_debug {
    file "data/named.run";
    severity dynamic;
    };
    };
    view localhost_resolver {
    match-clients {
    localhost;
    };
    match-destinations {
    localhost;
    };
    recursion yes;
    include "/etc/named/named.root";
    include "/etc/named/named.rfc1912.zones";
    };
    key ddns_key {
    algorithm hmac-md5;
    secret "use /usr/sbin/dns-keygen to generate TSIG keys";
    };
    view "external" {
    match-clients {
    any;
    };
    match-destinations {
    any;
    };
    recursion no;
    include "/etc/named/named.root";
    zone "mydomain.com" {
    type master;
    file "mydomain.com.master.zone";
    };
    };
    ================================================== =====

    My named.root file (copied from internic.net)

    ================================================== =====
    ; This file holds the information on root name servers needed to
    ; initialize cache of Internet domain name servers
    ; (e.g. reference this file in the "cache . <file>"
    ; configuration file of BIND domain name servers).
    ;
    ; This file is made available by InterNIC
    ; under anonymous FTP as
    ; file /domain/named.root
    ; on server FTP.INTERNIC.NET
    ; -OR- RS.INTERNIC.NET
    ;
    ; last update: Feb 04, 2008
    ; related version of root zone: 2008020400
    ;
    ; formerly NS.INTERNIC.NET
    ;
    . 3600000 IN NS A.ROOT-SERVERS.NET.
    A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
    A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30
    ;
    ; formerly NS1.ISI.EDU
    ;
    . 3600000 NS B.ROOT-SERVERS.NET.
    B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
    ;
    ; formerly C.PSI.NET
    ;
    . 3600000 NS C.ROOT-SERVERS.NET.
    C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
    ;
    ; formerly TERP.UMD.EDU
    ;
    . 3600000 NS D.ROOT-SERVERS.NET.
    D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
    ;
    ; formerly NS.NASA.GOV
    ;
    . 3600000 NS E.ROOT-SERVERS.NET.
    E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
    ;
    ; formerly NS.ISC.ORG
    ;
    . 3600000 NS F.ROOT-SERVERS.NET.
    F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
    F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
    ;
    ; formerly NS.NIC.DDN.MIL
    ;
    . 3600000 NS G.ROOT-SERVERS.NET.
    G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
    ;
    ; formerly AOS.ARL.ARMY.MIL
    ;
    . 3600000 NS H.ROOT-SERVERS.NET.
    H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
    H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803f:235
    ;
    ; formerly NIC.NORDU.NET
    ;
    . 3600000 NS I.ROOT-SERVERS.NET.
    I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
    ;
    ; operated by VeriSign, Inc.
    ;
    . 3600000 NS J.ROOT-SERVERS.NET.
    J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
    J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30
    ;
    ; operated by RIPE NCC
    ;
    . 3600000 NS K.ROOT-SERVERS.NET.
    K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
    K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
    ;
    ; operated by ICANN
    ;
    . 3600000 NS L.ROOT-SERVERS.NET.
    L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
    ;
    ; operated by WIDE
    ;
    . 3600000 NS M.ROOT-SERVERS.NET.
    M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
    M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
    ; End of File
    ================================================== =====

    Thanks in advance for any insight you can offer!

    -- acutchin

  7. #7
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Quote Originally Posted by acutchin View Post
    Sorry to bring up an old post, but I am getting the same error when trying to start named. I have searched the web and found only this post. Furthermore, I have visually checked my named.conf a hundred times now, and don't think I have any missing brackets. Please review my configs and tell me if I've missed something!

    Here is the error:

    ================================================== =====
    [root@my-server named]# service named start
    Starting named:
    Error in named configuration:
    /etc/named/named.root:1: '}' expected near ';'
    [FAILED]
    ================================================== =====
    This error is telling you that the error is on the first line ':1:' and it is expecting '}'


    Looking at your name.root file I see you are using ';' to comment the lines when you shouldn't be.


    My named.root file (copied from internic.net)

    ================================================== =====
    ; This file holds the information on root name servers needed to
    ; initialize cache of Internet domain name servers
    ; (e.g. reference this file in the "cache . <file>"
    ; configuration file of BIND domain name servers).
    ;
    [...]
    Replace these with '#'

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  8. #8
    Just Joined!
    Join Date
    Mar 2010
    Posts
    1

    Smile Problem Solved!!

    Hi Guys:

    I had the same problem but solved

    in CentOS5 just copied the file

    /usr/share/doc/bind-X.X.X/sample/etc/named.root.hints

    (where X.X.X is the version of bind installed on your box)

    To:

    /etc/named/

    Or if you have bind chrooted

    /var/named/chroot/etc


    the problem is than named.conf needs the definition of "." Zone, NOT the "." Zone File itself

    Anyway the contents of named.root.hints can be pasted instead the inclusion.


    named.root.hints contents:

    zone "." IN {
    type hint;
    file "named.root";
    };

    Best Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •