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.

named: rndc reload problem

Discussion in 'General Discussion' started by carock, Oct 11, 2008.

  1. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    I setup a new server running latest stable and after transferring soem sites from other servers, I had to edit a few DNS zones.

    Normally I woudl edit the zone file and then run rndc reload domain.com to activate the changes.

    On the new server I get an error.

    cpanel5(515):[/home]-#rndc reload domain.com
    rndc: 'reload' failed: not found

    I see in the named.conf file, there are two entries for the domain.

    One in a section labeled "view internal" and "view external"

    If I remove the domain config from one of the views, the rndc command runs without error.

    What am I doing wrong? I really need to be able to run this from the command line. I tried different version fo the command and also ndc, but nothing works other than just blanket reload without specifying the zone.

    Anyone have any ideas?

    Thanks,
    Chuck
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    I have wondered about this too. This seems to be a result of the views that were added to the /etc/named.conf file. I think this can be resolved by removing the views sections and instead just having a list of the domains and dns zones, but I figure if the views are there its for a reason.

    According to the rndc --help listing /usr/sbin/rndc reload <domain> should work, but it does not seem to work.

    You can use /usr/sbin/rndc reload <domain> IN external to reload the DNS zone in the external view. This seems to work, but only from external sources.

    If you increment the serial number on a zone and reload the zone with the external view, then doing a:

    dig domain SOA @localhost

    on the server, it does not show the incremented serial number. But if you do it from an external source and specify the server's IP address instead of localhost, then it shows the correct serial number.

    So this leads you to believe that this is because you just reloaded the external view, so try reloading the internal view /usr/sbin/rndc reload <domain> IN internal but still when you do a:

    dig domain SOA @localhost

    the serial is not shown as incremented.

    I'm just wondering how we are suppose to reload DNS zones now.

    Why doesn't /usr/sbin/rndc reload <domain> work any more?

    Or are we suppose to just use /usr/sbin/rndc reload ?

    It really doesn't matter to me, I'm just wanting to know what the correct way to reload a zone is, now with views being used.

    How does cPanel reload DNS zones? When a subdomain is added, the DNS zone for that domain has to be reloaded, does cPanel just do a /usr/sbin/rndc reload or do they specify the domain name some how?
     
  3. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    You can use

    rndc reload <ZONE> IN external
    rndc reload <ZONE> IN internal
     
  4. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Is there a way to reload the cache using this method?

    If you look up a DNS record on the server using localhost, for example:

    dig example.com SOA @localhost

    Then update the DNS zone and issue the command:

    rndc reload example.com IN internal

    Then if you dig the domain again:

    dig example.com SOA @localhost

    You still get the old information. You have to wait for the cache (I'm assuming) to expire.

    Not a huge issue, but just something that used to work when views weren't being used.
     
  5. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Run

    Code:
    rndc flush
     
  6. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Ah, that would do it. Many thanks.
     
Loading...

Share This Page