Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: rndc: connect failed: connection refused  (Read 2038 times)

0 Members and 1 Guest are viewing this topic.

lijeshk

  • Guest
rndc: connect failed: connection refused
« on: December 27, 2013, 08:13:01 am »
After starting named with the command /etc/init.d/named start you get an OK but the named server is not running.  The problem could be that named tries to write to the file /var/run/named.pid .

On most Linux/UNIX systems the user named is not allowed to write to that file. Instead the user named should write to /var/run/named/named.pid

Solution:

  • Open /etc/named.conf and add pid-file “/var/run/named/named.pid” to the “options” section.
  • If you run rndc-confgen you should add the pid-file section yourself.

Code: [Select]
# Use with the following in named.conf, adjusting the allow list as needed:
options {
 pid-file "/var/run/named/named.pid";
}
key "rndc-key" {
      algorithm hmac-md5;
      secret "DTKqPmkyorw5dFYCyz6Fiw==";
};
controls {
      inet 127.0.0.1 port 953
              allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf

--

 :)
« Last Edit: December 27, 2013, 10:29:05 am by lijeshk »