• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Named will not start

N

networkthinking

Guest
Hello,
I was trying to get the default certificate to work and changed the server name to match the certificate. Once i did this, named/bind stopped and will not start.

I switched the server back to the old name but it still does not work.

Here is the error in Plesk:
Unable to make action: Unable to manage service by dnsmng: dnsmng: Service named failed to start
0: /usr/local/psa/admin/htdocs/server/restart_services.php:19 psaerror(string "Unable to make action: Unable to manage service by dnsmng: dnsmng: Service named failed to start")

I tried via a command line and got this:
service named start
Starting named: /etc/named.conf:6: change directory to '/var/named' failed: file not found
/etc/named.conf:6: parsing failed

Feb 27 10:10:14.206 starting BIND 9.2.4 -g
Feb 27 10:10:14.207 using 2 CPUs
Feb 27 10:10:14.210 loading configuration from '/etc/named.conf'
Feb 27 10:10:14.216 no IPv6 interfaces found
Feb 27 10:10:14.216 listening on IPv4 interface lo, 127.0.0.1#53
Feb 27 10:10:14.217 listening on IPv4 interface eth0, 192.168.10.15#53
Feb 27 10:10:14.217 listening on IPv4 interface eth0:1, 192.168.10.16#53
Feb 27 10:10:14.217 listening on IPv4 interface eth0:2, 192.168.10.17#53
Feb 27 10:10:14.218 listening on IPv4 interface eth0:3, 192.168.10.20#53
Feb 27 10:10:14.218 listening on IPv4 interface eth0:4, 192.168.10.18#53
Feb 27 10:10:14.222 command channel listening on 127.0.0.1#953
Feb 27 10:10:14.222 ignoring config file logging statement due to -g option
Feb 27 10:10:14.222 couldn't open pid file '/var/run/named/named.pid': Permission denied
Feb 27 10:10:14.222 exiting (due to early fatal error)
Error in configuration file /etc/named.conf : [FAILED]

Any ideas on how to get bind/named up and running again?


Wally
 
We are having this issue with Plesk 8.*. Any help here??
 
First, check that the named.conf file has the correct paths. Then check the ownership (named : named) and permissions for the PID and zone files, and the /var/named and or the /var/run/named directory ownership/permissions as well.
 
bind-chroot

There was an update issued by RHN this evening which updated the bind-chroot rpm. As part of it's post install script it will attempt to relocate any zone files that may be located outside of the chroot into a chrooted directory in /var/named/chroot.

Since PSA implements a chroot for named outside of this package the nameserver files will be relocated to a path like...

/var/named/chroot/var/named/run-root/var/named/

This will of course break named's ability to startup.

simply remove the bind-chroot rpm and re-link the /etc/named.conf file to the right location.


rpm -e bind-chroot
ln -sf /var/named/run-root/etc/named.conf /etc/named.conf
/sbin/service named restart

You should be good to go at that point.

Matt Montgomery
Rackspace Managed Hosting
 
this **** happened to me about 20 min.. ago..

thanks for the fix racker_mmontgom

My stuff is back up and running

Is there any need to even have bind-chroot installed?

Can i just put it in my exclude list for my up2date?
 
bind-chroot in pkgSkiplist

This package is a meta package with some crazy pre/post-install scriptlet that moves the contents of ./var/named into /var/named/chroot/.

I've had this package removed from our install process. pkgSkiplist addition may not be a bad idea. It appears to be completely redundant since the plesk installer sets up the chroot it needs.

Matt Montgomery
Rackspace Customer Support
 
Now what?
I have done everything listed here - and named fails everytime with the same error -


Error in named configuration:
/etc/named.conf:6: change directory to '/var/named' failed: file not found
/etc/named.conf:6: parsing failed

help anyone?
Plesk 7.5.4 fedora 3
 
doesn't sound like your sym link is correct..

if you do an ls -al on /etc/named.conf, does it look like this?

[root@linux01 ~]# ls -al /etc/named.conf
lrwxrwxrwx 1 root root 34 Aug 14 20:18 /etc/named.conf -> /var/named/run-root/etc/named.conf
 
Sure does:


[root@server1 init.d]# ls -al /etc/named.conf
lrwxrwxrwx 1 root root 34 Aug 15 23:43 /etc/named.conf -> /var/named/run-root/etc/named.conf
 
rpm -qa |grep bind-chroot
returns null.

and
# rpm -e bind_chroot
error: package bind_chroot is not installed
 
It seems it must be some type of permissions or something -
 
here are the permissions on each directory
[root@linux01 ~]# ls -ld /var
drwx--x--x 23 root root 4096 Aug 6 13:15 /var
[root@linux01 ~]# ls -ld /var/named/
drwxr-x--- 6 root named 4096 Aug 14 20:17 /var/named/
[root@linux01 ~]# ls -ld /var/named/run-root/
drwxr-xr-x 6 root root 4096 Aug 14 20:04 /var/named/run-root/
[[root@linux01 ~]# ls -ld /var/named/run-root/etc
drwxr-xr-x 2 root root 4096 Aug 14 20:17 /var/named/run-root/etc
[root@linux01 ~]# ls -ld /var/named/run-root/etc
drwxr-xr-x 2 root root 4096 Aug 14 20:17 /var/named/run-root/etc
[root@linux01 ~]# ls -al /var/named/run-root/etc/named.conf
-rw-r--r-- 1 named named 30642 Aug 14 13:12 /var/named/run-root/etc/named.conf
 
do you have it installed.. ??
[root@linux01 ~]# rpm -qa |grep bind
bind-devel-9.2.4-16.EL4
bind-utils-9.2.4-16.EL4
bind-9.2.4-16.EL4
bind-libs-9.2.4-16.EL4
 
bind-libs-9.2.5-3
bind-utils-9.2.5-3
ypbind-1.17.2-3
bind-9.2.5-3
 
Check the full message

Hello,

Look for the "starting BIND" message from the /var/log/messags file. You should see something like this:

Aug 16 11:06:50 www named[32466]: starting BIND 9.2.4 -u named -c /etc/named.conf -u named -t /var/named/run-root

If the last option '-t' to named is not "/var/named/run-root" then check the /etc/sysconfig/named file and reset the ROOTDIR= to the correct path.

Matt Montgomery
 
All I get is:
==============
Aug 16 11:26:12 server1 named: failed
Aug 16 11:26:14 server1 named: failed
Aug 16 11:26:14 server1 named: /etc/named.conf:7: change directory to '/var/name
d' failed: file not found
Aug 16 11:26:14 server1 named: /etc/named.conf:7: parsing failed

========
I checked the sysconfig -
ROOTDIR="/var/named/run-root"
OPTIONS="-c /etc/named.conf -u named"
 
Look at your named.conf file on like 7.

i bet it says...

directory "/var/named";

It should read

directory "/var";

Matt Montgomery
 
It did.
edited it to var, and now this:


Starting named: /etc/named.conf:68: open: /etc/rndc.key: file not found

Error in named configuration:
/etc/named.conf:68: open: /etc/rndc.key: file not found

the filed does exist.
 
Back
Top