打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Layered Technologies Helpdesk :: Support Port...
BIND: couldn‘t open pid file ‘/var/run/named.pid‘: File exists

Article ID:
000050
Rating:
5.0 / 5.0 (4 votes)
Views:
554

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
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
[原创] 架设dns全攻略
[emerg] open() “/var/run/nginx/nginx.pid” failed (2: No such file or directory)
rndc的用途
centos5.5 DNS详细配置说明 1
Linux技术中坚站论坛 - 为了答谢冷风、游魂斑竹,特总结DNS学习体会与大家分享!
安装BIND
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服