Link to home
Start Free TrialLog in
Avatar of SheppardDigital
SheppardDigital

asked on

named won't start, unknown key 'rndc-key'

I have a VPS running Centos 6.4 and WHM 11.44.1

Yesterday I started receiving emails saying that the named service had failed and couldn't be restarted.

When attempting to start the server I get the following

Starting named: /etc/init.d/named: line 97: 28896 Aborted                 /usr/sbin/named-checkconf $ckcf_options ${named_conf} > /dev/null 2>&1

Error in named configuration:
/etc/named.conf:4: unknown key 'rndc-key'
/etc/rndc.key:1: key '': bad key name
/etc/rndc.key:1: key '': bad key name
/etc/rndc.key:1: key '': bad key name
mem.c:1246: REQUIRE(ctx->references == 1) failed, back trace
#0 0x7fce761546c6 in ??
#1 0x7fce7615489a in ??
#2 0x7fce761667a2 in ??
#3 0x403571 in ??
#4 0x7fce7499bd1d in ??
#5 0x4025d9 in ??

In an attempt to fix the issue I've updated WHM to the latest version and ran the command /scripts/fixrndc as described on various websites on the internet, but it still doesn't seem to resolve the issue.

I'm hoping someone will be able to help me fix this issue.
Avatar of duncanb7
duncanb7

Are you using cpanel?

If so, try it ,rebulid the /etc/named.conf file, it may work

/scripts/rebuilddnsconfig


Duncan
Avatar of SheppardDigital

ASKER

During the rebuild it tries to restarted named and I get the same error as above.
you are using cpanel, right ?

Duncan
whm/cpanel
when you rebullid it , did you rename the file  /etc/named.conf ?

Duncan
I didn't rename any files when I ran /scripts/rebuilddnsconfig
If it helps, this is the content of /etc/rndc.conf

key "" {
        algorithm hmac-md5;
        secret "";
};

Open in new window


and this is the top of the file /etc/named.conf

include "/etc/rndc.key";

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

options {
    /* make named use port 53 for the source of all queries, to allow
         * firewalls to block all ports except 53:
         */

    // query-source    port 53;

    /* We no longer enable this by default as the dns posion exploit
        has forced many providers to open up their firewalls a bit */

    // Put files that named is allowed to write in the data/ directory:
    directory                "/var/named"; // the default
    pid-file                 "/var/run/named/named.pid";
    dump-file                "data/cache_dump.db";
    statistics-file          "data/named_stats.txt";
   /* memstatistics-file     "data/named_mem_stats.txt"; */
    allow-transfer {"none";};
};

Open in new window


It looks to me like rdnc-key isn't defined in the rndc.conf file. I guess this is causing the problem, but how do I re-create that key?
Just to add, I've tried renaming the rndc.conf file and running the /scripts/fixrndc commend, but again, it doesn't generate a key.
ASKER CERTIFIED SOLUTION
Avatar of duncanb7
duncanb7

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
On normal centos it generates absent rndc.conf when starting
This resolved my issue, although I had to remove the options section from the generated rndc.key
thx for yr pt

ve a nice day

duncan