Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED How do you stop named from creating named.run files?

Discussion in 'Bind/DNS/Nameserver' started by WebHostPro, May 22, 2018.

Tags:
  1. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,651
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    Our DNS servers are piling up massive 2-3gb named.run files and was wondering how to disable named from creating/reporting to these files.

    I don't need the report and would rather save on the read writes.

    I found this old thread but it doesn't say where to disable it.

    How can I get rid of the large named.run files?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hi @WebHostPro,

    The following entry will exist in the /etc/named.conf file when debug logging is enabled:

    Code:
    channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
    };
    To disable debug logging, update this entry to:

    Code:
    channel default_debug {
            null;
    };
    Then, restart the service using the following command:

    Code:
    /scripts/restartsrv_named
    Let me know if you don't see this entry in your /etc/named.conf file. Note you will need to manually remove the existing named.run log file to free up the space.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,651
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yeah, the named.conf file in the etc folder doesn't have that code. It just has a bunch of DNS zones and this:

    include "/etc/rndc.key";

    controls {
    inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
    };

    //
    // named.conf for Red Hat caching-nameserver
    //

    options {
    directory "/var/named";
    dump-file "/var/named/data/cache_dump.db";
    statistics-file "/var/named/data/named_stats.txt";
    /*
    * 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;
    };

    //
    // a caching only nameserver config
    //
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @WebHostPro,

    You can also set the debugging level to "0" with the following commands:

    Code:
    rndc notrace
    rndc reload
    /scripts/rebuilddnsconfig
    Can you let me know if that stops the addition of new entries to the named.run file on an affected system? If not, can you let me know the specific recent entries that appear in the named.run file?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,651
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    I think that worked! I got some warnings, do they look like anything I should worry about?

    WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)
    root@1234 [/var/named/data]# rndc reload
    WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)
    server reload successful

    and

    This looks good!

    [/var/named/data]# /scripts/rebuilddnsconfig
    Waiting for ânamedânamedâ

    Service Status
    named (/usr/sbin/named -u named) is running as named with PID 11782 (pid
    file+/proc check method).

    Startup Log
    Starting named: [ OK ]

    named restarted successfully.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can safely ignore that warning message. It's due to the existence of the /etc/rndc.conf file, which isn't needed because the entries it uses are already defined in the /etc/named.conf file. Internal case CPANEL-20503 will address this false warning message in cPanel & WHM version 74.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice