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

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,725
28
328
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?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
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.
 
Last edited:

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,725
28
328
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
//
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
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.
 

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,725
28
328
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)
[email protected] [/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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
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)
[email protected] [/var/named/data]# rndc reload
WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)
server reload successful
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.
 

abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
cPanel Access Level
Root Administrator
Hi cPanelMichael,
It looks like you missed }; in the below code, could you please confirm?

To disable debug logging, update this entry to:

Code:
channel default_debug {
        null;
};
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
Hello @abdelhost77,

I updated the previous post to reflect the syntax correction you noted.

Thanks!