[Bug 729780] [NEW] bind9 fails to create pid file.
Anand Kumria
wildfire at progsoc.org
Sat Mar 5 18:29:30 UTC 2011
Public bug reported:
Binary package hint: bind9
1.
root at ns3:~# lsb_release -rd
Description: Ubuntu 10.04.2 LTS
Release: 10.04
2.
ot at ns3:~# apt-cache policy bind9
bind9:
Installed: 1:9.7.0.dfsg.P1-1ubuntu0.1
Candidate: 1:9.7.0.dfsg.P1-1ubuntu0.1
Version table:
*** 1:9.7.0.dfsg.P1-1ubuntu0.1 0
500 http://gb.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
500 http://security.ubuntu.com/ubuntu/ lucid-security/main Packages
100 /var/lib/dpkg/status
1:9.7.0.dfsg.P1-1 0
500 http://ubuntu.positive-internet.com/ubuntu/ lucid/main Packages
500 http://gb.archive.ubuntu.com/ubuntu/ lucid/main Packages
3.
I expected bind to create a pid file.
4.
bind9 did not create a pid file.
Here are the default when installing from scratch, and 'apt-get install
bind9'.
root at ns3:~# ps aux | grep bind
root 4138 0.0 0.2 6156 736 pts/0 S+ 18:27 0:00 grep bind
root at ns3:~# ls -l /var/run/
total 44
drwxr-xr-x 2 root root 60 Mar 5 14:50 ConsoleKit
-rw-r--r-- 1 root root 4 Mar 4 06:36 collectdmon.pid
-rw-r--r-- 1 root root 5 Mar 4 06:37 console-kit-daemon.pid
-rw-r--r-- 1 root root 4 Mar 4 06:36 crond.pid
---------- 1 root root 0 Mar 4 06:36 crond.reboot
drwxr-xr-x 2 messagebus messagebus 80 Mar 4 06:36 dbus
drwxr-xr-x 2 root root 80 Mar 4 06:36 fail2ban
-rw-r--r-- 1 root root 3 Mar 4 06:36 memcached.pid
-rw-r--r-- 1 root root 187 Mar 5 14:50 motd
drwxrwxr-x 2 root bind 40 Nov 30 20:35 named
running bind9 results in:
Mar 5 18:27:47 ns3 named[4154]: starting BIND 9.7.0-P1 -u bind
Mar 5 18:27:47 ns3 named[4154]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--en
able-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres
=no' '--with-dlz-mysql=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fn
o-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS='
Mar 5 18:27:47 ns3 named[4154]: adjusted limit on open files from 1024 to 1048576
Mar 5 18:27:47 ns3 named[4154]: found 1 CPU, using 1 worker thread
Mar 5 18:27:47 ns3 named[4154]: using up to 4096 sockets
Mar 5 18:27:47 ns3 named[4154]: loading configuration from '/etc/bind/named.conf'
Mar 5 18:27:47 ns3 named[4154]: reading built-in trusted keys from file '/etc/bind/bind.keys'
Mar 5 18:27:47 ns3 named[4154]: using default UDP/IPv4 port range: [1024, 65535]
Mar 5 18:27:47 ns3 named[4154]: using default UDP/IPv6 port range: [1024, 65535]
Mar 5 18:27:47 ns3 named[4154]: listening on IPv6 interfaces, port 53
Mar 5 18:27:47 ns3 named[4154]: listening on IPv4 interface lo, 127.0.0.1#53
Mar 5 18:27:47 ns3 named[4154]: listening on IPv4 interface eth0, 95.172.29.74#53
Mar 5 18:27:47 ns3 named[4154]: Could not open '/var/run/named/named.pid'.
Mar 5 18:27:47 ns3 named[4154]: Please check file and directory permissions or reconfigure the filename.
Mar 5 18:27:47 ns3 named[4154]: could not open file '/var/run/named/named.pid': Permission denied
Mar 5 18:27:47 ns3 named[4154]: generating session key for dynamic DNS
Mar 5 18:27:47 ns3 named[4154]: Could not open '/var/run/named/session.key'.
Mar 5 18:27:47 ns3 named[4154]: Please check file and directory permissions or reconfigure the filename.
Mar 5 18:27:47 ns3 named[4154]: could not open file '/var/run/named/session.key': Permission denied
Mar 5 18:27:47 ns3 named[4154]: could not create /var/run/named/session.key
Mar 5 18:27:47 ns3 named[4154]: failed to generate session key for dynamic DNS: permission denied
Mar 5 18:27:47 ns3 named[4154]: automatic empty zone: 254.169.IN-ADDR.ARPA
root at ns3:~# ps aux | grep bind
bind 4154 0.1 5.1 119468 12864 ? Ssl 18:27 0:00 /usr/sbin/named -u bind
root 4169 0.0 0.2 6156 740 pts/0 S+ 18:28 0:00 grep bind
OK - so it is running as the user bind.
Let's chown the directory to that user:
root at ns3:~# chown bind: /var/run/named/
root at ns3:~# ls -la /var/run/
total 48
drwxr-xr-x 11 root root 440 Mar 5 14:50 .
drwxr-xr-x 15 root root 4096 Mar 4 05:21 ..
drwxr-xr-x 2 root root 60 Mar 5 14:50 ConsoleKit
-rw-r--r-- 1 root root 4 Mar 4 06:36 collectdmon.pid
-rw-r--r-- 1 root root 5 Mar 4 06:37 console-kit-daemon.pid
-rw-r--r-- 1 root root 4 Mar 4 06:36 crond.pid
---------- 1 root root 0 Mar 4 06:36 crond.reboot
drwxr-xr-x 2 messagebus messagebus 80 Mar 4 06:36 dbus
drwxr-xr-x 2 root root 80 Mar 4 06:36 fail2ban
-rw-r--r-- 1 root root 3 Mar 4 06:36 memcached.pid
-rw-r--r-- 1 root root 187 Mar 5 14:50 motd
drwxrwxr-x 2 bind netdev 40 Nov 30 20:35 named
Notice that the group has changed to netdev.
Unfortuately, this does not fix the problem either:
Mar 5 18:29:08 ns3 named[4186]: starting BIND 9.7.0-P1 -u bind
Mar 5 18:29:08 ns3 named[4186]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--en
able-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres
=no' '--with-dlz-mysql=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fn
o-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS='
Mar 5 18:29:08 ns3 named[4186]: adjusted limit on open files from 1024 to 1048576
Mar 5 18:29:08 ns3 named[4186]: found 1 CPU, using 1 worker thread
Mar 5 18:29:08 ns3 named[4186]: using up to 4096 sockets
Mar 5 18:29:08 ns3 named[4186]: loading configuration from '/etc/bind/named.conf'
Mar 5 18:29:08 ns3 named[4186]: reading built-in trusted keys from file '/etc/bind/bind.keys'
Mar 5 18:29:08 ns3 named[4186]: using default UDP/IPv4 port range: [1024, 65535]
Mar 5 18:29:08 ns3 named[4186]: using default UDP/IPv6 port range: [1024, 65535]
Mar 5 18:29:08 ns3 named[4186]: listening on IPv6 interfaces, port 53
Mar 5 18:29:08 ns3 named[4186]: binding TCP socket: address in use
Mar 5 18:29:08 ns3 named[4186]: listening on IPv4 interface lo, 127.0.0.1#53
Mar 5 18:29:08 ns3 named[4186]: binding TCP socket: address in use
Mar 5 18:29:08 ns3 named[4186]: listening on IPv4 interface eth0, 95.172.29.74#53
Mar 5 18:29:08 ns3 named[4186]: binding TCP socket: address in use
Mar 5 18:29:08 ns3 named[4186]: Could not open '/var/run/named/named.pid'.
Mar 5 18:29:08 ns3 named[4186]: Please check file and directory permissions or reconfigure the filename.
Mar 5 18:29:08 ns3 named[4186]: could not open file '/var/run/named/named.pid': Permission denied
Mar 5 18:29:08 ns3 named[4186]: generating session key for dynamic DNS
Mar 5 18:29:08 ns3 named[4186]: Could not open '/var/run/named/session.key'.
Mar 5 18:29:08 ns3 named[4186]: Please check file and directory permissions or reconfigure the filename.
Mar 5 18:29:08 ns3 named[4186]: could not open file '/var/run/named/session.key': Permission denied
Mar 5 18:29:08 ns3 named[4186]: could not create /var/run/named/session.key
Mar 5 18:29:08 ns3 named[4186]: failed to generate session key for dynamic DNS: permission denied
Mar 5 18:29:08 ns3 named[4186]: automatic empty zone: 254.169.IN-ADDR.ARPA
** Affects: bind9 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to bind9 in ubuntu.
https://bugs.launchpad.net/bugs/729780
Title:
bind9 fails to create pid file.
More information about the Ubuntu-server-bugs
mailing list