Centos7 – named starts manually, but systemctl reports timeout

bindcentos7

named starts and runs fine if I start it manually ("/usr/sbin/named -u named"), but when I start it with systemctl, it fails:

# systemctl start named
Job for named.service failed because a timeout was exceeded. See "systemctl status named.service" and "journalctl -xe" for details.

The status just shows normal named messages, however a "ps alx" while it's still running makes it look like it's looking for password input somewhere, which it shouldn't be doing, but maybe that's a default systemctl thing and a red herring:

4     0 18608 28440  20   0 134824  1296 poll_s S+   pts/1      0:00 systemctl start named
0     0 18609 18608  20   0  15428   824 poll_s S+   pts/1      0:00 /usr/bin/systemd-tty-ask-password-agent --watch
0     0 18610 18608  20   0 294680  3056 poll_s Sl+  pts/1      0:00 /usr/bin/pkttyagent --notify-fd 5 --fallback
5    25 18624     1  20   0 294512 146616 sigsus Ssl ?          0:06 /usr/sbin/named -u named -c /etc/named.conf

Anyway, hopefully someone knows what's going on…

Best Answer

You can test your named.conf configuration with the named-checkconf command.

named-checkconf /etc/named.conf

If there's no output from that command, your named.conf configuration is good.

If there's an error, you'll see some reference to the error.