BIND: couldn‘t open pid file ‘/var/run/named.pid‘: File exists
|
Problem:On a FreeBSD host BIND will not start after making changes or an upgrade. When restarting BIND and running ‘tail -f /var/log/messages‘ you see the following error ‘couldn‘t open pid file ‘/var/run/named.pid‘: File exists‘Solution:named needs a place to put its ‘pid‘ file. And since its running as a un-privileged user ‘bind‘ it needs a place its pid file. That place must be owned by the bind user and bind must be able to write its pid file there.# Create the directory. mkdir /var/run/named # Change the perms chown -R bind:bind /var/run/named Edit the named.conf file to tell named to use that file. Add the following entry to your named.conf file after the ‘controls‘ statement and before any of the ‘zone‘ statements. ## Start options { pid-file "/var/run/named/named.pid"; }; ## End Make sure you do not have any extra }; in the file and then save the file and restart named. named -u bind -c /etc/namedb/named.conf Then check /var/log/messages and see if there was any errors. # Sucessful startup. tail /var/log/messages Feb 6 11:34:51 ran named[1298]: starting BIND 9.3.0 -u bind -c /etc/namedb/named.conf Feb 6 11:34:51 ran named[1298]: command channel listening on 127.0.0.1#953 BIND should now start with no errors and place its pid file in /var/run/named/named.pid |
联系客服