The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding DNS zones corrupted...

Discussion in 'Bind / DNS / Nameserver Issues' started by lmi, Jul 26, 2006.

  1. lmi

    lmi Member

    Joined:
    Mar 9, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    WHM 10.8.0 cPanel 10.8.2-R119
    Fedora i686 - WHM X v3.1.0

    Hello... when configuring by example addon domains, the httpd.conf entries are fine, the named.conf entry is fine too, but the .db archive will become corrupted...

    something like:

    Code:
    cat /var/named/xxxx.xxx.db 
    ; cPanel 10
    ; Zone file for xxxx.xxx
    $TTL 14400
    @      86400    IN      SOA     xxx.xxxx.xxx. sat.xxxxx.xxx. (
                    2006072601      ; serial, todays date+todays
                    86400           ; refresh, seconds
                    7200            ; retry, seconds
                    3600000         ; expire, seconds
                    86400 )         ; minimum, seconds
    
    xxxx.xxx. 86400 IN NS xxx.xxxx.xxx.
    xxxx.xxx. 86400 IN NS xxx.xxxx.xxx.
    
    %nameserverentry%. IN A %nameservera%
    %nameserverentry2%. IN A %nameservera2%
    %nameserverentry3%. IN A %nameservera3%
    %nameserverentry4%. IN A %nameservera4%
    
    xxxx.xxx. IN A 213.xxx.xx.xx
    
    localhost.xxxx.xxx. IN A 127.0.0.1
    
    xxxx.xxx. IN MX 0 xxxx.xxx.
    
    mail IN CNAME xxxx.xxx.
    www IN CNAME xxxx.xxx.
    ftp IN CNAME xxxx.xxx.
    The way to solve this is just deleting the brong lines:

    But, why are the added, causing dns zone not working???

    any ideas?

    (I´m quite novice in Cpanel, I´m sorry)
     
    #1 lmi, Jul 26, 2006
    Last edited: Jul 26, 2006
  2. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    same problem here.

    a temporary quick'n'dirty fix:

    Code:
    sed -i 's/%nameserverentry%. IN A %nameservera%//g' /var/named/*.db
    sed -i 's/%nameserverentry2%. IN A %nameservera2%//g' /var/named/*.db
    sed -i 's/%nameserverentry3%. IN A %nameservera3%//g' /var/named/*.db
    sed -i 's/%nameserverentry4%. IN A %nameservera4%//g' /var/named/*.db
    
     
  3. slev

    slev Member

    Joined:
    Mar 25, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Same problem here with latest edge build

    When you add a new site / domain it adds the correct name servers but also adds 3 with
    '%nameservera% in the box

    The site will not show up till you manually delete the '%nameservera% from the dns zone.
     
  4. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    Seen this too.

    Edit your dns templates in whm and remove these entries

    %nameserverentry%. IN A %nameservera%
    %nameserverentry2%. IN A %nameservera2%
    %nameserverentry3%. IN A %nameservera3%
    %nameserverentry4%. IN A %nameservera4%

    You should be fine adding accounts and dns zones after that...

    # rndc reload

    # tail -100 /var/log/messages

    and watch for any zones with errors and correct as required .. there are several issues with zones at the moment, not just this one.
     
  5. salvatore333

    salvatore333 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    If you dont know how to edit these dns zone templates is there a way to fix them all another way?

    Thank you
     
  6. duranduran

    duranduran Well-Known Member

    Joined:
    Apr 30, 2004
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    Samo problem here. I try to edit the zone template:

    ; cPanel %cpversion%
    ; Zone file for %domain%
    $TTL %ttl%
    @ %nsttl% IN SOA %nameserver%. %rpemail%. (
    %serial% ; serial, todays date+todays
    86400 ; refresh, seconds
    7200 ; retry, seconds
    3600000 ; expire, seconds
    86400 ) ; minimum, seconds

    %domain%. %nsttl% IN NS %nameserver%.
    %domain%. %nsttl% IN NS %nameserver2%.
    %domain%. %nsttl% IN NS %nameserver3%.
    %domain%. %nsttl% IN NS %nameserver4%.

    %domain%. IN A %ip%

    localhost.%domain%. IN A 127.0.0.1

    %domain%. IN MX 0 %domain%.

    mail IN CNAME %domain%.
    www IN CNAME %domain%.
    ftp IN CNAME %domain%.


    But i receive this error:


    There were errors in the new zone template which have been highlighted below, please press the back button an try again!

    zonetemplate/IN: has no NS records

    ; cPanel %cpversion%
    ; Zone file for %domain%
    $TTL %ttl%
    @ %nsttl% IN SOA %nameserver%. %rpemail%. (
    %serial% ; serial, todays date+todays
    86400 ; refresh, seconds
    7200 ; retry, seconds
    3600000 ; expire, seconds
    86400 ) ; minimum, seconds


    %domain%. IN A %ip%

    localhost.%domain%. IN A 127.0.0.1

    %domain%. IN MX 0 %domain%.

    mail IN CNAME %domain%.
    www IN CNAME %domain%.
    ftp IN CNAME %domain%.
     
  7. duranduran

    duranduran Well-Known Member

    Joined:
    Apr 30, 2004
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    Does anybody have any solution for this problem?
    I tried all fixes.
     
  8. BlueZebra

    BlueZebra Well-Known Member

    Joined:
    Apr 27, 2006
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    I had the same issue on few of my servers. What is the fix?

    Editing the template and removing the entries "%nameserverentry%. IN A %nameservera%" is that?
     
    #8 BlueZebra, Sep 26, 2006
    Last edited: Sep 26, 2006
  9. otsh

    otsh Member

    Joined:
    Sep 9, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Seeing this issue as well, this is from me downgrading from current to stable on redhat ent 4


    root@ns7 [/var/named]# grep % /var/named/*
    /var/named/asgeh.com.db:%nameserverentry%. IN A %nameservera%
    /var/named/asgeh.com.db:%nameserverentry2%. IN A %nameservera2%
    /var/named/asgeh.com.db:%nameserverentry3%. IN A %nameservera3%
    /var/named/asgeh.com.db:%nameserverentry4%. IN A %nameservera4%
    /var/named/bmtweb.net.db:%nameserverentry%. IN A %nameservera%
    /var/named/bmtweb.net.db:%nameserverentry2%. IN A %nameservera2%
    /var/named/bmtweb.net.db:%nameserverentry3%. IN A %nameservera3%
    /var/named/bmtweb.net.db:%nameserverentry4%. IN A %nameservera4%
     
  10. angelina_holy

    angelina_holy Well-Known Member

    Joined:
    Aug 6, 2006
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Lame Server Resolve

    A lame server is a name server that is not properly configured. This error is harmless but very annoying. The detailed explanation is that the "lame server" is authoritative for a given domain but its configuration does not properly reflect this in its Name Server (NS) and Start of Authority (SOA).
    By default, whenever someone uses the DNS server to resolve a hostname (ie: www.redhat.com), BIND will emit such a message in /var/log/messages. It can be disabled by adding the following to the /etc/named.conf file using a text editor:


    service named stop



    nano -w /etc/named.conf

    Cpanel:

    pico /etc/named.conf

    Find this section, at the top;

    options {
    directory "/var/named";
    /*
    * If there is a firewall between you and nameservers you want
    * to talk to, you might need to uncomment the query-source
    * directive below. Previous versions of BIND always asked
    * questions using port 53, but BIND 8.1 uses an unprivileged
    * port by default.
    */
    // query-source address * port 53;
    };


    After it add;
    add the three lines at the top

    logging {
    category notify { null; };
    category lame-servers { null; };
    };
    service named restart
     
Loading...

Share This Page