Here's my scenario, I used to have a named server running nearly flawless, even getting updated by my dhcpd server.
I had my config and zone files backed up. I basically overhauled my server...more specifically built a new one
. On the new server I installed named via the package manager of my server.
I was quite bothered by it being placed in /var/lib/named, so making a bad decision I moved it all to /var/named. I did modify the /etc/init.d/named start script file to reflect the directory change (for chroot).
Getting to the actual problem:
When I start named I get the following error in /var/log/messages:
Code:
Jul 19 16:07:24 localhost named[13150]: couldn't open pid file '/var/run/named/named.pid': No such file or directory
Jul 19 16:07:24 localhost named[13150]: exiting (due to early fatal error)
ls -lR of /var/named
Code:
.:
total 12K
drwxr-xr-x 2 root root 4.0K 2008-07-18 13:21 dev
drwxr-xr-x 2 root root 4.0K 2008-07-19 16:07 etc
drwxr-xr-x 6 root root 4.0K 2008-07-18 12:58 var
./dev:
total 0
crw-rw-rw- 1 root root 1, 3 2008-07-18 13:21 null
crw-rw-rw- 1 root root 1, 8 2008-07-18 13:21 random
crw-rw-rw- 1 root root 1, 8 2008-07-18 13:21 urandom
./etc:
total 16K
-rw-r--r-- 1 root root 3.5K 2008-07-19 16:07 localtime
-rw-r----- 1 root named 1.5K 2008-07-19 15:35 named.conf
-rw-r----- 1 root named 479 2008-07-19 15:33 rndc.conf
-rw-r----- 1 root named 113 2008-07-19 15:19 rndc.key
./var:
total 16K
drwxr-x--- 2 named named 4.0K 2008-07-19 15:22 log
drwxr-x--- 2 named named 4.0K 2008-07-19 15:41 named
drwxr-x--- 2 named named 4.0K 2008-07-19 16:06 run
drwxr-x--- 2 named named 4.0K 2008-07-08 21:41 tmp
./var/log:
total 0
-rw-r----- 1 named named 0 2008-07-19 15:22 named_auth.log
-rw-r----- 1 named named 0 2008-07-19 15:22 named_info.log
-rw-r----- 1 named named 0 2008-07-19 15:22 named_update.log
./var/named:
total 24K
-rw-r----- 1 named named 329 2008-07-19 15:30 named.23.23.10.in-addr.arpa
-rw-r----- 1 named named 1.6K 2008-07-19 15:23 named.ca
-rw-r----- 1 named named 442 2008-07-19 15:28 named.home.lnx
-rw-r----- 1 named named 225 2008-07-19 15:23 named.local
-rw-r----- 1 named named 4.4K 2008-07-19 15:23 named.run
./var/run:
total 0
-rw-r----- 1 named named 0 2008-07-19 16:06 named.pid
./var/tmp:
total 0
Running the following command produces no output or log output
Code:
named -c /etc/named.conf -f -t /var/named/ -u named
I am sure it is a problem with chrooting, perhaps named is not chrooting and its looking for files based on the real root directory.
If anyone has any solutions/ideas/input etc please be generous! Otherwise I am going to remove the install, download compile and install from source as I got it to work that way before.
Thanks,
Sean