1

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...

4
  • What does the log say when you try to start it through systemd? Jan 25, 2019 at 21:26
  • After I delete all the loading zone messages, they are identical whether starting with systemd or manually, aside from systemd giving up and killing it: 30 seconds after named is started there is "systemd: named.service start operation timed out. Terminating." and named shutting down log messages.
    – abatie
    Jan 26, 2019 at 1:04
  • What changes did you make to /etc/sysconfig/named and to the named.service unit? Jan 26, 2019 at 3:18
  • None, and I did a yum update as well (which did update named)
    – abatie
    Jan 29, 2019 at 0:55

2 Answers 2

1

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.

1
  • If it were a named configuration problem, it wouldn't start up manually.
    – abatie
    Jan 29, 2019 at 0:55
1

The problem turned out to be that systemd was looking for the process pid in a different place than named.conf was putting it:

May  3 16:04:59 ns2 systemd: PID file /run/named/named.pid not readable (yet?) after start.
options {
        directory       "/var/named";
        pid-file        "/var/run/named/pid";
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.