Page 1 of 2 12 LastLast
Results 1 to 20 of 29

Thread: My named.conf file is empty

  1. #1
    Join Date
    Sep 2011
    Posts
    56

    My named.conf file is empty

    Hi,
    After DA installation on Debian 6.0 and domain not resolving, my name servers behave like lame name servers. On trouble shooting, I found my named.conf file empty. Any suggestion? Thanks

  2. #2
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    Check this for recreate zones-link

    http://help.directadmin.com/item.php?id=393

    Regarding the first part of named.conf here is mine from a debian 5 box

    Code:
    // This is the primary configuration file for the BIND DNS server named.
    //
    // Please read /usr/share/doc/bind9/README.Debian.gz for information on the
    // structure of BIND configuration files in Debian, *BEFORE* you customize
    // this configuration file.
    //
    // If you are just adding zones, please do that in /etc/bind/named.conf.local
    
    include "/etc/bind/named.conf.options";
    
    // prime the server with knowledge of the root servers
    zone "." {
            type hint;
            file "/etc/bind/db.root";
    };
    
    // be authoritative for the localhost forward and reverse zones, and for
    // broadcast zones as per RFC 1912
    
    zone "localhost" {
            type master;
            file "/etc/bind/db.local";
    };
    
    zone "127.in-addr.arpa" {
            type master;
            file "/etc/bind/db.127";
    };
    
    zone "0.in-addr.arpa" {
            type master;
            file "/etc/bind/db.0";
    };
    
    zone "255.in-addr.arpa" {
            type master;
            file "/etc/bind/db.255";
    };
    
    include "/etc/bind/rndc.key";
    
    logging {
            channel b_log {
                    file "/var/log/bind9/bind.log" versions 30 size 1m;
                    print-time yes;
                    print-category yes;
                    print-severity yes;
                    severity info;
            };
    
            channel b_debug {
                    file "/var/log/bind9/debug.log" versions 2 size 1m;
                    print-time yes;
                    print-category yes;
                    print-severity yes;
                    severity dynamic;
            };
    
            channel b_query {
                    file "/var/log/bind9/query.log" versions 2 size 1m;
                    print-time yes;
                    severity info;
            };
    
            category default { b_log; b_debug; };
            category config { b_log; b_debug; };
            category queries { b_query; };
      };
    
    
    include "/etc/bind/named.conf.local";
    Regards
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  3. #3
    Join Date
    Sep 2011
    Posts
    56

    Thumbs down I ran the script fix.sh, but named.conf remains unfound

    I ran the script fix.sh as shown below, but it didn't fix the named.conf problem. What is the exact directory of named.conf file? Can I manually reconstitute it in Debian 6.0?

    root@server1:/usr/local/directadmin# chmod -R 755 /etc/fix.sh
    root@server1:/usr/local/directadmin# fix.sh
    -bash: fix.sh: command not found
    root@server1:/usr/local/directadmin# /etc/fix.sh
    Checking server1.biomedcircle.net ... Already exists. Skipping
    Checking biomedcircle.com ... Already exists. Skipping
    Checking luloot.net ... Already exists. Skipping
    root@server1:/usr/local/directadmin# nano named.conf
    root@server1:/usr/local/directadmin# named-checkzone biomedcircle.net named.conf
    zone biomedcircle.net/IN: loading from master file named.conf failed: file not found
    zone biomedcircle.net/IN: not loaded due to errors.

    Thanks for your help

  4. #4
    Join Date
    Sep 2011
    Posts
    56

    Thumbs down Would re-installing DNS (Bind9) restore the named.conf file

    I was wondering if re-installing DNS would restore the named.conf file and whether that would affect DA functionality.
    Thanks

  5. #5
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    The file should be in /etc/bind/ with all .db files

    post output for:
    Code:
    cat /etc/bind/named.conf
    Regards
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  6. #6
    Join Date
    Sep 2011
    Posts
    56

    Question named.conf file found-we are making progress

    I have found the file named.cpnf now, thanks to you!
    the hostname domain biomedcicle.net and all other domains are listed. However, I got the following error when I test for biomedcircle.net as described below:

    /usr/local/directadmin# named-checkzone biomedcircle.net /etc/bind/named.conf
    /etc/bind/named.conf:1: unknown RR type 'This'
    dns_master_load: /etc/bind/named.conf:3: unexpected end of line
    dns_master_load: /etc/bind/named.conf:2: unexpected end of input
    /etc/bind/named.conf:4: unknown RR type 'structure'
    /etc/bind/named.conf:5: unknown RR type 'this'
    dns_master_load: /etc/bind/named.conf:7: unexpected end of line
    dns_master_load: /etc/bind/named.conf:6: unexpected end of input
    dns_master_load: /etc/bind/named.conf:9: syntax error
    dns_master_load: /etc/bind/named.conf:9: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:9: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:10: syntax error
    dns_master_load: /etc/bind/named.conf:10: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:10: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:11: syntax error
    dns_master_load: /etc/bind/named.conf:11: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:11: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:12: syntax error
    dns_master_load: /etc/bind/named.conf:12: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:12: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:13: syntax error
    dns_master_load: /etc/bind/named.conf:13: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:13: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:14: syntax error
    dns_master_load: /etc/bind/named.conf:14: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:14: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:15: syntax error
    dns_master_load: /etc/bind/named.conf:15: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:15: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:16: syntax error
    dns_master_load: /etc/bind/named.conf:16: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:16: unbalanced quotes
    zone biomedcircle.net/IN: loading from master file /etc/bind/named.conf failed: unknown class/type
    zone biomedcircle.net/IN: not loaded due to errors.

    Please note that my name servers ns1.biomedcircle.net and ns2.biomedcircle.net are not working and resolv.conf is properly configured:

    domain biomedcircle.net
    search biomedcircle.net
    nameserver 68.87.64.146
    nameserver 68.87.75.194

    I hope somehow, we can fix this.
    Thank you so much for your help!

  7. #7
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    /etc/bind/named.conf:1: unknown RR type 'This'

    You got something uncommented.. or some missing "

    Post the output ive asked before

    Regards
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  8. #8
    Join Date
    Sep 2011
    Posts
    56

    cat /etc/bind/named.conf file

    Here is the output for cat /etc/bind/named.conf:

    // This is the primary configuration file for the BIND DNS server named.
    //
    // Please read /usr/share/doc/bind9/README.Debian.gz for information on the
    // structure of BIND configuration files in Debian, *BEFORE* you customize
    // this configuration file.
    //
    // If you are just adding zones, please do that in /etc/bind/named.conf.local

    include "/etc/bind/named.conf.options";
    include "/etc/bind/named.conf.local";
    include "/etc/bind/named.conf.default-zones";
    zone "server1.biomedcircle.net" { type master; file "/etc/bind/server1.biomedcircle.net.db"; };
    zone "178.187.73.50.in-addr.arpa" { type master; file "/etc/bind/178.187.73.50.in-addr.arpa.db"; };
    zone "biomedcircle.info" { type master; file "/etc/bind/biomedcircle.info.db"; };
    zone "biomedcircle.net" { type master; file "/etc/bind/biomedcircle.net.db"; };
    zone "biomedcircle.com" { type master; file "/etc/bind/biomedcircle.com.db"; };

    Thank you

  9. #9
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    mmmh.. dont see any error but try remote those lines:

    // This is the primary configuration file for the BIND DNS server named.
    //
    // Please read /usr/share/doc/bind9/README.Debian.gz for information on the
    // structure of BIND configuration files in Debian, *BEFORE* you customize
    // this configuration file.
    //
    // If you are just adding zones, please do that in /etc/bind/named.conf.local

    Regards
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  10. #10
    Join Date
    Jun 2009
    Posts
    557
    All comments must begin with ; // is not right for comments.

  11. #11
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    Oh, on my Debain 5 // work correctly (and actually is the standard one)...

    Thanks for the point

    Regards
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  12. #12
    Join Date
    Sep 2011
    Posts
    56

    Did you mean "remove those lines"?

    try remote those lines: Did you mean "remove those lines"? I replaced "//" with "#", but the problem remains.
    Thanks

  13. #13
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    yes,

    mr.applesauce suggested to use ;
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  14. #14
    Join Date
    Sep 2011
    Posts
    56

    I use ;, but the problem remains

    Here is the new test output:


    root@server1:~# named-checkzone biomedcircle.net /etc/bind/named.conf
    dns_master_load: /etc/bind/named.conf:9: syntax error
    dns_master_load: /etc/bind/named.conf:9: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:9: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:10: syntax error
    dns_master_load: /etc/bind/named.conf:10: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:10: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:11: syntax error
    dns_master_load: /etc/bind/named.conf:11: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:11: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:12: syntax error
    dns_master_load: /etc/bind/named.conf:12: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:12: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:13: syntax error
    dns_master_load: /etc/bind/named.conf:13: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:13: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:14: syntax error
    dns_master_load: /etc/bind/named.conf:14: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:14: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:15: syntax error
    dns_master_load: /etc/bind/named.conf:15: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:15: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:16: syntax error
    dns_master_load: /etc/bind/named.conf:16: isc_lex_gettoken() failed: unbalanced quotes
    dns_master_load: /etc/bind/named.conf:16: unbalanced quotes
    zone biomedcircle.net/IN: loading from master file /etc/bind/named.conf failed: syntax error
    zone biomedcircle.net/IN: not loaded due to errors.

    Is there something fundamentally wrong with the DNS installation? Should I remove dns and re-install?
    Thanks for all your help

  15. #15
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    mmmh

    mv that named.conf to named.conf.bk and create a new one like this:


    Code:
    include "/etc/bind/named.conf.options";
    
    // prime the server with knowledge of the root servers
    zone "." {
            type hint;
            file "/etc/bind/db.root";
    };
    
    // be authoritative for the localhost forward and reverse zones, and for
    // broadcast zones as per RFC 1912
    
    zone "localhost" {
            type master;
            file "/etc/bind/db.local";
    };
    
    zone "127.in-addr.arpa" {
            type master;
            file "/etc/bind/db.127";
    };
    
    zone "0.in-addr.arpa" {
            type master;
            file "/etc/bind/db.0";
    };
    
    zone "255.in-addr.arpa" {
            type master;
            file "/etc/bind/db.255";
    };
    
    include "/etc/bind/rndc.key";
    
    logging {
            channel b_log {
                    file "/var/log/bind9/bind.log" versions 30 size 1m;
                    print-time yes;
                    print-category yes;
                    print-severity yes;
                    severity info;
            };
    
            channel b_debug {
                    file "/var/log/bind9/debug.log" versions 2 size 1m;
                    print-time yes;
                    print-category yes;
                    print-severity yes;
                    severity dynamic;
            };
    
            channel b_query {
                    file "/var/log/bind9/query.log" versions 2 size 1m;
                    print-time yes;
                    severity info;
            };
    
            category default { b_log; b_debug; };
            category config { b_log; b_debug; };
            category queries { b_query; };
      };
    
    zone "server1.biomedcircle.net" { type master; file "/etc/bind/server1.biomedcircle.net.db"; };
    zone "178.187.73.50.in-addr.arpa" { type master; file "/etc/bind/178.187.73.50.in-addr.arpa.db"; };
    zone "biomedcircle.info" { type master; file "/etc/bind/biomedcircle.info.db"; };
    zone "biomedcircle.net" { type master; file "/etc/bind/biomedcircle.net.db"; };
    zone "biomedcircle.com" { type master; file "/etc/bind/biomedcircle.com.db"; };
    Let me know

    Regards
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  16. #16
    Join Date
    Sep 2011
    Posts
    56

    mv named.conf to named.conf.bk

    Just to be sure, you want me to delete named.conf and replace it with named.conf.bk. Am I right? Or do I just change named.conf to named.conf.bk with the new content? If so, what's the command line to change the name?
    Thanks

  17. #17
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    Your actual named.conf have to be renamed to named.conf.bk (for have the original copy just in case)

    Then touch named.conf and edit it pasting the one i gave

    Regards
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  18. #18
    Join Date
    Sep 2011
    Posts
    56

    change named.conf to named.conf.bk

    Hi,
    The problem remains after I changed the file named.conf to named.conf.bk (while keeping the original) and substituting the content you gave me for the file.
    Best regards

  19. #19
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    Same error?

    Could you please post output for :

    Code:
    cat /etc/bind/named.conf.options
    Regards
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  20. #20
    Join Date
    Sep 2011
    Posts
    56

    cat /etc/bind/named.conf.options

    I see two problems with this file: 1) there are no forwarders; 2) "//" should be replaced with ";" from the comment lines:

    root@server1:~# cat /etc/bind/named.conf.options
    options {
    directory "/var/cache/bind";

    // If there is a firewall between you and nameservers you want
    // to talk to, you may need to fix the firewall to allow multiple
    // ports to talk. See http://www.kb.cert.org/vuls/id/800113

    // If your ISP provided one or more IP addresses for stable
    // nameservers, you probably want to use them as forwarders.
    // Uncomment the following block, and insert the addresses replacing
    // the all-0's placeholder.

    // forwarders {
    // 0.0.0.0;
    // };

    auth-nxdomain no; # conform to RFC1035
    listen-on-v6 { any; };
    };

    I will give you an update soon
    Thanks

Similar Threads

  1. Replies: 14
    Last Post: 11-10-2013, 02:57 PM
  2. Replies: 3
    Last Post: 09-05-2012, 09:52 AM
  3. /var/named empty recreate .db files
    By RackSystems in forum DNS
    Replies: 6
    Last Post: 07-02-2010, 12:14 PM
  4. suPhp.conf file empty?
    By kevster in forum General Technical Discussion & Troubleshooting
    Replies: 9
    Last Post: 01-05-2010, 07:07 AM
  5. access_log aways empty for default httpd.conf
    By Peter Laws in forum Apache (WWW)
    Replies: 5
    Last Post: 03-04-2009, 07:56 AM

Posting Permissions

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