Where and what is /var/run/named?

# service named start
Starting name server BIND checkproc: Can not stat /var/run/named/named.pid: Too many levels of symbolic links
- Warning: /var/run/named/named.pid exists! start_daemon: Can not stat /var/run/named/named.pid: Too many levels of symbolic links

Eh?  Somehow I messed up wherever /var/run/named is supposed to be.  This happened when changing a root-jail DNS server to a non-jailed server.  After toggling the NAMED_RUN_CHROOTED value to "no" in /etc/sysconfig/named starting named complains about this [this named is meant to integrate with Samba4]. Seems strange.  Once you try to restart named after this change /var/run/named is automatically created as a directory - but it doesn't work.  This fix is to stop named and create the correct symbolic link:
ln -s /var/lib/named/var/run/named /var/run/named
Not sure how this situation happens; but now the fix/gotcha is here for the search engines to crawl.

1 comment:

  1. Lifesaver. Also having a go at Samba 4. This got me too.