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.

dns mess

Discussion in 'Bind / DNS / Nameserver Issues' started by MACscr, Sep 7, 2010.

  1. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    i seemed to screw up my cpaneldns cluster as I am seeing all zones on all cpanel servers and now even though i have removed a server from the cluster and performed a dns cleanup, its still showing other servers' dns zones. Any ideas on how i can get that cleaned up?
     
  2. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    Are you seeing the all zones in "WHM >> DNS Functions" or in /var/named/ folder. If its the second case, you need to ensure that your servers (not serving DNS duties) have clustering set to "synchronize changes" in WHM while at your primary DNS, you need to set it as "Stand alone". This will ensure your primary DNS, does not copy back all the dns zones to all your servers.
    For cleanup, I will wait for a cPanel tech to jump in and assist you.

     
  3. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Yeah, i actually do know what i had done wrong, but its not part of the cluster anymore.

    Actually i just checked one of the servers and it seems that only a few domains that dont below there are showing up in named.conf. Seems the issue is more with /var/named having an excess of domains that dont below to that system. i would think the contents of /var/named wouldnt really matter if there wasnt an entry in /etc/named.conf. Am I wrong?
     
  4. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    Correct, only the space occupied by the zones will matter if there is no named.conf entry, and that space is minimal.

     
  5. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    OH, im not worried about the storage space they are taking up. I am worried about the it adding 500% more entries in my "Edit DNS Zone" list. Which is what its doing right now.
     
  6. chuza

    chuza Well-Known Member

    Joined:
    Jul 4, 2008
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    How did you clean up the excessive zones from named.conf

     
  7. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I never manually cleaned up the named.conf. The only thing i have done besides removing it from the cluster, was run the DNS cleanup tool. Though I am not sure what else that really does besides remove duplicates. Thats one of the reasons why i think its so odd that im getting the iist of domains that im seeing that are listed in the "Edit DNS Zone" options and not the named.conf
     
  8. chuza

    chuza Well-Known Member

    Joined:
    Jul 4, 2008
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Are you referring to /scripts/cleandns
     
  9. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Yeah, im pretty sure thats what the link "Perform a DNS cleanup" does.
     
  10. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Is WHM the only area that is displaying DNS zones from other servers in your cluster, or are the DNS zones from other servers also seen elsewhere on each system?

    Are any of the DNS zones from other servers stored locally, such as within the following directory path?
    Code:
    /var/named/
    The "unmanaged_zones" auto-repair script might be of interest, depending on what is needed; this can help to locate DNS zones that might not be directly managed by the local server, such as if they originated from a different server in the cluster:
    Code:
    # /scripts/autorepair unmanaged_zones
    Before attempting to remove any DNS zones I recommend saving a fresh backup:
    Code:
    # cp -av /var/named /var/named.backup.$(date -u +%Y%m%d%H%M%S%Z)
     
  11. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Don, that seemed almost perfect, but unfortunately it seems to include a lot of zones that are on that server or at least managed on that server. I am moving all servers from the cluster and they are just for now going to do their own dns before i move to the new setup, so it really should only be zones from its own server. How does it create this list? Are they supposed to be domains not in the named.conf?
     
  12. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I believe one of the criteria may involve listing DNS zones that are not setup on a local cPanel account; the script may also look for DNS zones that are missing configuration entries, such as in /etc/named.conf. If you would like us to take a look at the situation you are welcome to submit a support request; with direct insight into seeing the DNS zone and clustering configuration we may be able to offer more specific suggestions or direction in how to proceed.
     
  13. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Maybe i was looking at it wrong. One one system, it showed me that i could remove all those entries by running:

    Code:
    /scripts/unmanaged_zones
    but that doesnt seem to do anything on two other systems. Well it doesnt delete any at least, it shows:

    Code:
    All zones accounted for and managed by cPanel/WHM. See /etc/unmanaged_zones for exclusions.
    And shows the list of unamanged zones above it. Seems the two servers worked differently. One seemed to use that list for a delete list and the other used it for an exclusion list. Im confused.
     
  14. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Domain names removed from the generated list (in "/etc/unmanaged_zones") will be removed upon manually running the matching script ("/scripts/unmanaged_zones"), thus excluding domains that are manually retained in the list; that is, domain names you decide to keep in the list are excluded from removal, while all domains that are deleted from the list will be removed.

    When running the auto repair script for the first time, there should be text similar to the following:
    Code:
    Writing unmanaged/unauthoritative domains to /etc/unmanaged_zones
    To remove any unmanaged domains from this system please edit /etc/unmanaged_zones
    and remove any domains that you wish to have removed and run /scripts/unmanaged_zones.
    Zones added through the WHM directly will be included in this list. Please review the zones
    listed in the file carefully and ensure that they should be removed before deleting their
    respective entries in /etc/unmanaged_zones.
    Done
    The auto-repair script will create the following file and matching script:
    Code:
    /etc/unmanaged_zones
    /scripts/unmanaged_zones
    The aforementioned two files may be removed to recreate a first-run scenario:
    Code:
    # rm -fv /etc/unmanaged_zones /scripts/unmanaged_zones
    # /scripts/autorepair unmanaged_zones
     
  15. chuza

    chuza Well-Known Member

    Joined:
    Jul 4, 2008
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Great post. Would this auto-repair script remove the unmanaged zones locally even if it is configured in a DNS cluster.
    Normally if you use /scripts/killdns script which I believe cPanel must also be using, it removes the zones locally as well as from the clustered servers but obviously in the case mentioned in this thread, we only want unwanted zones removed locally. killdns or killdns-dnsadmin scripts do not have any switch to stop that from happening afaik.

     
  16. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I believe that /scripts/unmanaged_zones will only apply locally. As a precautionary measure I recommend to save a fresh backup of existing DNS zones.
     
Loading...

Share This Page