BIND/DNS will not start named.conf.local file not found

Discussion in 'Installation/Configuration' started by MrCompTech, Jul 7, 2010.

  1. rbroomfield

    rbroomfield New Member

    Bind issue

    I'll try it now. Thanks for helping us out here :)
  2. rbroomfield

    rbroomfield New Member

    well..... i've followed re-installed and got the same problem. This is crazy! why will it not work! please help:(
  3. till

    till Super Moderator Staff Member ISPConfig Developer


    Post the output of:

    locate named.conf
  4. rbroomfield

    rbroomfield New Member

    [root@u1027 install]# updatedb
    [root@u1027 install]# locate named.conf

    Thanks for your help
  5. rbroomfield

    rbroomfield New Member

    This is the error in the message.log

    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 loaded serial 0
    zone NS '' has no address records (A or AAAA)
    zone NS '' has no address records (A or AAAA)
    zone not loaded due to errors.
    _default/ bad zone
  6. rbroomfield

    rbroomfield New Member

    Discovered this in the log as well....

    Jul 10 12:25:32 u1027 named[16547]: managed-keys-zone ./IN: loading from master file /var/named/dynamic/managed-keys.bind failed: permission denied
    Jul 10 12:25:32 u1027 named[16547]: /var/named/dynamic/managed-keys.bind.jnl: open: permission denied
    Jul 10 12:25:32 u1027 named[16547]: managed-keys-zone ./IN: journal rollforward failed: unexpected error

    These file do not exist either.......any clues?

    Thanks in advance
  7. MrCompTech

    MrCompTech New Member

    Hi rbroomfield,

    I ran the updatedb and locate named.conf on my system and the output from the locate command looks exactly like your.

    Running /etc/init.d/named restart does restart my DNS server with no errors, BUT I have not created any clients, web sites, email, or DNS Zones that's going to be next.

    I have made almost no changes to the default install.

    What I have changed is:
    In /etc/named.conf:
    Changed the 'listen-on' option to include my servers LAN IP
    listen-on port 53 {;; };
    Changed the 'allow-query' option to include my local LAN
    allow-query {localhost;; }

    At first boot after finishing the entire How-To for "The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]" named was NOT running.

    I created an empty named.conf.local like so:
    echo > /etc/named.conf.local

    Then I started named:
    /etc/init.d/named start

    Then I logged in to the ISPConfig3 web admin from my laptop on the same local LAN.

    Went to System --> Server Config --> (clicked on my server) --> Server tab
    Corrected the Gateway Address to point to my cable modem
    Corrected the Nameservers to point to my own server

    Went to System --> Server Config --> (clicked on my server) --> DNS tab
    Confirmed that the settigns matched the output of 'locate named.conf'

    Logged out of the web admin, rebooted the server, logged back in to the server checked that named restarted ok, logged in to the ISPConfig3 web admin and checked the "Monitor" tab and all was green.

    Next I am going to start adding a client and see what happens with the DNS I'll but that in my next post.
  8. MrCompTech

    MrCompTech New Member

    BIND will not start after adding first domain

    Well rbroomfield, looks like I'm right there with ya!

    Add first client, DNS, Email and Sites
    Log in to ISPConfig3 web admin.
    Click on "Client"
    Click "Add New Client" button
    Filled out info.
    Used "mct_" as user name since I think that is used for logins under this client.
    Did not change anything on the "Limits" tab.

    Click on DNS tab
    Under DNS Wizard click on Add DNS Zone
    Selected client "mct_"
    IP Address: All my sites will be on the same server and since I am using named based virtual hosting all will have the same ip address.
    NS 1 :, which is this ISPConfig3 server w/ DNS (BIND)
    NS 2 :, Two are required but I only have one local DNS server
    Email: mrcomptech at yahoo dot com

    Click on Email tab
    Click the "Add New Domain" button
    Server: prl-ofc-s01
    Client: "mct_"
    Spam Filter:Normal
    Active: checked

    Click on Sites tab
    Click the "Add New Website" button
    Server: prl-ofc-s01
    Client: "mct_"
    IP Address:
    Harddisk Quota: unchanged
    Traffic Quota: unchanged
    CGI: unchecked
    SSI: unchecked
    SUEXEC: unchecked
    Own Error Documents:checked
    Auto-Subdomain: www.
    SSL: unchecked
    PHP: disabled
    Active: checked
    NO other settigns were changed

    Checked to see if named would restart without error.
    And no it doesn't!

    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 loaded serial 0
    zone NS '' has no address records (A or AAAA)
    zone NS '' has no address records (A or AAAA)
    zone not loaded due to errors.
    _default/ bad zone
  9. MrCompTech

    MrCompTech New Member

    I also noticed that when I ping or nslookup (to ISPConfig3 server) I get my publlic IP address instead of the internal LAn address of my server.
  10. MrCompTech

    MrCompTech New Member

    On my LAN my 'main' domain is
    I had already added a DNS zone for this.

    The FQDN of my server is

    I added a DNS 'record' for this server as follows:

    Log into ISPConfig3 web admin.
    DNS tab --> selected zone ""
    Clicked on the "Records" tab
    Since I used the DNS wizard earlier I already had several records listed here.
    I added a new "A" record for prl-ofc-s01.

    Tried to restart named and still got the last error I mentioned.

    After researching and figuring out how to use the named-checkzone command and without making any changes I tried to restart named again and this time it started!

    I confirmed that DNS works on the ISPConfig3 server and on my (win Vista) laptop using the command:
    The is the IP address of the DNS server that you want to use for the DNS query.

    So now I finally see what is happening:

    First - changes made in the ISPConfig3 web admin console ARE NOT IMMEDIATE and can take at least several minutes for 'things' to update.

    Second - When there is a problem that prevents BIND (named) from starting I do not think that there is any mechanism in place to periodically attempt to restart the BIND deamon. So you must either manually try to restart named or reboot the server.
    /etc/init.d/named start
    Thirdly - In ISPConfig3 web admin when you configure your ISPConfig3 server:

    System tab --> Server Config --> (select your server) -->

    The host name listed must have a DNS entry.

    So if, as in my case, my internal domain is "" and the name of my ISPConfig3 server is "prl-ofc-s01" then the FQDN of my ISPConfig3 server is "".

    In order for DNS to work properly there must be a DNS entry for this server in the DNS records!

    Part of this is that when you add a DNS Zone, DNS tab --> "Add New DNS Zone". One of the items you enter is the hostname of the DNS server and NOT the IP address of the DNS server. So, if using hostnames then there MUST be a way to resolve the host name that is used, including the hostname of the DNS server!

    So even though I added the domain for "" I had not yet added an "A" record for the server "prl-ofc-s01" so 'things' didn't work properly.

    This came to light after a ran the commands:
    cd /var/named
    /var/named - location of the zone files - name of the domain to check - name of the file containing the zone records

    When I ran this command when DNS was not working, part of the error message indicated that that was no record for "".

    I knew there was an entry for this server in the /etc/hosts file so this didn't make sense. But apparently named is NOT reading the hosts file for name resolution.
  11. rudisoft

    rudisoft New Member

    Had the same problem, here's how i fixed it

    Hello everyone,

    Using the same setup (The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]) on 2 different servers (local and production),
    i had exaclty the same problem.

    On local server I followed the tutorial for installing, while on production server had a minimal setup with no services.

    After many struggles and almost giving up, i managed to solve the problem, and now DNS works great!

    Thanx to @MrCompTech for all his helpful posts (esp. the last one), they were a great starting point in solving my problem!

    Here are the steps i took in order to make it work:

    1. Before step 17 in the tutorial (17 Install BIND) make sure bind-chroot is not installed.
    You can check with:

    yum list installed bind*
    and remove it with

    yum remove bind-chroot
    2. I did this after finishing the tutorial, and installing ISPConfig (ISPConfig configures bind)
    The file "named.conf.local" is first created when you start to add DNS Zones in ISPConfig,
    so until then starting bind fails with the error that it can't find this file.
    So we create the file and give the same permissions as "/etc/named.conf"
    touch /etc/named.conf.local
    chown root:named /etc/named.conf.local
    chmod 640 /etc/named.conf.local
    Now bind starts ok, and it seems to work, because we have no zones set up

    3. Next problem was the "bad zone" / "has no NS records error" when creating DNS zones in ISPConfig.
    This gave me the most headache of them all, and took the longest to solve, but it turned out the solution is actually really simple,
    and it is given to us in the error message itself:
    "zone YOURDOMAINNAMEHERE/IN: has no NS records"
    It can't say more clear than that :)
    So, in the DNS zone records in ISPconfig i just had to add NS records like so:
    Zone: [LEAVE BLANK]
    Nameserver Hostname: ns1.ZONENAME
    TTL: 86400
    Active: [checked]

    And another one for ns2, though i'm not sure it was really necessary.

    Then, just make sure you have A records for [BALNK], www, ns1, ns2.

    That's it, problem solved!

    Note: It is true that changes made by ISPConfig take some time, so please be patiend, wait for a few minutes until veryfing.
    In order to verfy if your zone files are ok you can use the following command:
    named-checkzone ZONE_NAME /var/named/ZONE_FILE
    At this point, DNS only worked locally, external queries were rejected.

    4. So i modified the file "./etc/named.conf" like so:
    listen-on port 53 {;};
    listen-on port 53 {; SERVER_IP;};

    allow-query {localhost; } 
    allow-query {any; } 
    I tried @MrCompTech's method with SERVER_IP/24 but it dind't work until i changed to all.

    In order to verify is everything is ok, you can use these commands:

    host DOMAIN_NAME
    nslookup DOMAIN_NAME
    dig DOMAIN_NAME @localhost
    (to check if it works locally)
    (to check if it works externally)

    This is it. Hope this helps someone!
  12. foxnet

    foxnet New Member

    Solve problem in DNS on ISPConfig 3

    I solve this problem with a little different way....

    Base on Fedora Core 13, bind running in chroot mode.

    First I try:
    #ln -s /etc/named.conf.local /var/named/chroot/etc/named.conf.local

    But not solve, the error message now is that file named.conf.local is not valid.

    Than I try:
    #ln -P /etc/named.conf.local /var/named/chroot/etc/named.conf.local

    THAT´S IT!!! Now working!!!
    Don´t forget to create domain zone file.

    Fabricio Figueiredo Leao <[email protected]>
    Technologist in computer network
  13. Zarteg

    Zarteg New Member



    Not sure why it took me so long to Goog the answer !
  14. QuetzalFirst

    QuetzalFirst Member

    I can't add "trusted-servers;" in "allow transfert zone..." I would be a nice feature... no?
  15. QuetzalFirst

    QuetzalFirst Member

    Disregard last post... found the answer!

Share This Page