I've tried restarting them

# /sbin/service named restart
Stopping named: [ OK ]
Starting named: [FAILED]

And I've tried this to fix it

# yum install dbus

Which completed successfully. But I still can't get them to start.


Some useful information

[root@ip-184-168-86-185 /]# /sbin/service named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [FAILED]
[root@ip-184-168-86-185 /]# tail -50 /var/log/messages
2011-09-20T18:32:37.322626-07:00 ip-184-168-86-185 rsyslogd: [origin software="rsyslogd" swVersion="3.22.1" x-pid="3127" x-info="http://www.rsyslog.com"] (re)start
2011-09-20T18:32:37.321006-07:00 ip-184-168-86-185 rsyslogd: WARNING: rsyslogd is running in compatibility mode. Automatically generated config directives may interfer with your rsyslog.conf settings. We suggest upgrading your config and adding -c3 as the first rsyslogd option.
2011-09-20T18:32:37.322354-07:00 ip-184-168-86-185 rsyslogd: Warning: backward compatibility layer added to following directive to rsyslog.conf: ModLoad imuxsock
2011-09-21T11:38:21.437308-07:00 ip-184-168-86-185 shutdown[16303]: shutting down for system reboot
2011-09-21T11:38:22.551115-07:00 ip-184-168-86-185 init: Switching to runlevel: 6
2011-09-21T11:38:22.578505-07:00 ip-184-168-86-185 saslauthd[1834]: server_exit     : master exited: 1834
2011-09-21T11:38:38.059150-07:00 ip-184-168-86-185 xinetd[1422]: Exiting...

-

-rwxr-xr-x  2 root root      381956 Feb 22  2011 named
-rwxr-xr-x  1 root root        7299 Feb 22  2011 named-bootconf
-rwxr-xr-x  1 root root       13640 Feb 22  2011 named-checkconf
-rwxr-xr-x  1 root root       13644 Feb 22  2011 named-checkzone

-

[root@ip-184-168-86-185 /]# grep named /var/log/messages
[root@ip-184-168-86-185 /]# ls -la /etc/named.conf
lrwxrwxrwx 1 root named 32 Feb  1  2011 /etc/named.conf -> /var/named-chroot/etc/named.conf
[root@ip-184-168-86-185 /]# ls -la /etc/rndc.conf
lrwxrwxrwx 1 root named 32 May 23 16:23 /etc/rndc.conf -> /var/named-chroot//etc/rndc.conf
[root@ip-184-168-86-185 /]# nano etc/named.conf
options {
        directory "/var/named";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;

        // don't allow queries for domains we don't know about
        allow-recursion {localnets; };
};

controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
        type hint;
        file "named.root";
};

zone "localhost" IN {
        type master;
        file "forward.localhost";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "reverse.127.0.0";
        allow-update { none; };
};

include "/etc/rndc.key";

include "/etc/named-turbopanel.conf";
link|improve this question

You need to provide more details here. Log excerpts, troubleshooting steps, etc. – ErikA Sep 21 '11 at 21:37
Usually, you will see the error in /var/log/message. What does it say there? Do this if you can't find it: /sbin/service named restart ; tail -50 /var/log/messages Then update the post with the output. – Rilindo Sep 21 '11 at 21:38
I've added the log data – stevether Sep 21 '11 at 21:46
Wait, init 6? it sound like it still in the process of rebooting: Do: grep named /var/log/messages. And do a ls -la on the following: ls -la /etc/named.conf ls -la /etc/rndc.conf Copy and past the output as well as the content of named.conf. – Rilindo Sep 21 '11 at 21:56
Done and added. – stevether Sep 21 '11 at 22:05
show 1 more comment
feedback

2 Answers

up vote 2 down vote accepted

Looking at your last output.

2011-09-20T18:32:37.322626-07:00 ip-184-168-86-185 rsyslogd: [origin software="rsyslogd" swVersion="3.22.1" x-pid="3127" x-info="http://www.rsyslog.com"] (re)start
2011-09-20T18:32:37.321006-07:00 ip-184-168-86-185 rsyslogd: WARNING: rsyslogd is running in compatibility mode. Automatically generated config directives may interfer with your rsyslog.conf settings. We suggest upgrading your config and adding -c3 as the first rsyslogd option.
2011-09-20T18:32:37.322354-07:00 ip-184-168-86-185 rsyslogd: Warning: backward compatibility layer added to following directive to rsyslog.conf: ModLoad imuxsock
2011-09-21T11:38:21.437308-07:00 ip-184-168-86-185 shutdown[16303]: shutting down for system reboot
2011-09-21T11:38:22.551115-07:00 ip-184-168-86-185 init: Switching to runlevel: 6
2011-09-21T11:38:22.578505-07:00 ip-184-168-86-185 saslauthd[1834]: server_exit     : master exited: 1834
2011-09-21T11:38:38.059150-07:00 ip-184-168-86-185 xinetd[1422]: Exiting...

it seems like the server is in process of restarting, but hung for some reason. Do a:

init 3

or restart the server. (most likely you may end up doing that anyway).

EDIT: Looks like there is a permission problem:

-rw-r----- 1 root root  5572 Sep 21 12:55 named-turbopanel.conf

Apparently that was added today, which is why you couldn't restart named properly - named could not read it.

Change the owernship:

chown root:named named-turbopanel.conf

and give it read permissions to :

chmod 644 named-turbopanel.conf

Incidentally, since you are running cents, check to see if you are running SELinux. If you are seeing the following output:

[root@localhost etc]# getenforce
Enforcing

Then you need the give it the following ACLs:

chcon -u system_u -t named_conf_t named-turbopanel.conf

and then make sure to label it correctly:

semanage fcontext -a -t named_conf_t named-turbopanel.conf

If you don't have semanage, you will need to install it via the policycoreutils-python.

link|improve this answer
Tried all that. Still not working pastebin.com/UsxMLSCc – stevether Sep 21 '11 at 22:21
Okay, let's try a tail -50 /var/log/messages, now that reboot condition clear – Rilindo Sep 21 '11 at 23:14
And please get the ls -la output of the following: /etc/named.conf, /etc/rndc.key and /etc/named-turbopanel.conf – Rilindo Sep 21 '11 at 23:15
No turbopanel but here's the rest. Looks like it's still on 6 pastebin.com/raw.php?i=J3cynGMJ – stevether Sep 21 '11 at 23:22
Run "uptime" If it is more than a few minutes, the server didn't reboot. If this is a VPS of some sort, try to see if you can reboot it from your control panel. – Rilindo Sep 21 '11 at 23:27
show 4 more comments
feedback

Run named in the foreground so that it prints it's messages to stdout

/usr/sbin/named -f 

If that doesn't give you sufficient information increase the debug level

/usr/sbin/named -f -d n

where n >=1 and increasing n produces more output.

link|improve this answer
Neither produced any output. – stevether Sep 21 '11 at 21:49
if you're running chroot, try starting named in the foreground like this: /usr/sbin/named -u named -t /var/named/chroot -g – anastrophe Sep 21 '11 at 23:22
@anastrophe pastebin.com/raw.php?i=wD4HRBXp – stevether Sep 22 '11 at 0:05
So, it appears as if you don't have /etc/named.conf softlinked to your chrooted environment. In mine, which is pretty much a default install, /etc/named.conf is a softlink to /var/named/chroot/etc/named.conf, as well with a softlink for the directory /etc/named.d to /var/named/chroot/etc/named.d . – anastrophe Sep 22 '11 at 18:03
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.