Named error: couldn’t open pid file ‘/var/run/named/named.pid’: File exists

Named error: couldn’t open pid file ‘/var/run/named/named.pid’: File exists

The following error causes named/bind to become unusable and fail.

Mar 25 14:10:09 station1 named[27449]: couldn't open pid file '/var/run/named/named.pid': File exists
Mar 25 14:10:09 station1 named[27449]: exiting (due to early fatal error)

I noticed the problem when working on RHEL servers. The user is root and the group is named. I’m assumed that the server could no longer do anything with the named.pid file because the group named does not have permission to change anything in the directory.

I found that changing the permissions for /var/named resolves the issue.

1. Correct the directory permissions

chmod 774 /var/named

2. Remove the pid file

rm /var/named/named.pid

3. Restart the bind service

service bind restart