named failed? Why

This is a New install of Fedora Core 4. I am trying to help someone recover named after they deleted the named.conf file.
I think it was set up as a caching server.

[root@stranded named]# /etc/init.d/named start
Starting named: [FAILED]

named.conf file:
options {
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        listen-on-v6 { any; };
        notify no;
        forwarders { 216.148.225.135; 167.142.225.5; 167.142.226.3; };
};

zone "." in {
        type hint;
        file "root.hint";
};

zone "localhost" in {
        type master;
        file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" in {
        type master;
        file "127.0.0.zone";
};

logging {
        category queries { log_file; };
        channel log_file { file "/var/named/log/named.log" versions 40 size 51M; };
        category xfer-in { log_file; };
        category xfer-out { log_file; };
        category default { log_file; };
};

There are no messages in /var/log/messages
The files root.hint, localhost.zone, 127.0.0.zone all exsists in /var/named/chroot/var/named/
There is nothing in /var/named/log/named.log

What am I missing and where the hell is the error messages going to. There must be some if it is failing.
LVL 1
brentrussellAsked:
Who is Participating?
 
NopiusCommented:
probably you run your named from chroot-ed environment in that case symlinks will not work, only real copies of files/directories.
0
 
NopiusCommented:
Place 'channel log_file { file "/var/named/log/named.log" versions 40 size 51M; };'
before 'category queries'

See for logging sintax: http://www.isc.org/sw/bind/arm93/Bv9ARM.ch06.html#id2553006

then
- Restart named.
- Check if it's running
- query ageinst it:
nslookup
>server localhost
>localhost
- See log file.
0
 
brentrussellAuthor Commented:
OK, I added that line before category queries and made sure the log file exsisted
named was not started because I can not get it started
I tried to start it but it failed again
Nothing in the log file, it just says:
Starting named: [FAILED]

Here is my named.conf file now:
options {
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        listen-on-v6 { any; };
        notify no;
        forwarders { 216.148.225.135; 167.142.225.5; 167.142.226.3; };
};

zone "." in {
        type hint;
        file "root.hint";
};

zone "localhost" in {
        type master;
        file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" in {
        type master;
        file "127.0.0.zone";
};

logging {
        channel log_file { file "/var/named/log/named.log" versions 40 size 20M; };
        category queries { log_file; };
        category xfer-in { log_file; };
        category xfer-out { log_file; };
        category default { log_file; };

};

Any other ideas?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
NopiusCommented:
Starting named: [FAILED]
that's completely different question, so named is not starting.

start it up manually, in forground and in debug mode to see why it doesnt' start:

named -d -1 -f
0
 
Gabriel OrozcoSolution ArchitectCommented:
hello

you told us that your zones directory is /var/named, however, your zone files are in /var/named/chroot per your question:
"The files root.hint, localhost.zone, 127.0.0.zone all exsists in /var/named/chroot/var/named/"

so update your options like:

options {
        directory "/var/named/chroot";

and test again
0
 
brentrussellAuthor Commented:
[root@stranded etc]# named -d -1 -f
named: debug level '-1' out of range
[root@strandedetc]# named -d -2 -f
named: debug level '-2' out of range
[root@stranded etc]# named -d -0 -f
       Nothing happened Here

These did not work:
[root@stranded etc]# /etc/init.d/named -d -0 -f
Usage: /etc/init.d/named {start|stop|status|restart|condrestart|reload|probe}

[root@stranded etc]# /etc/init.d/named -d -0 -f start
Usage: /etc/init.d/named {start|stop|status|restart|condrestart|reload|probe}

And still this does not work:
[root@stranded etc]# /etc/init.d/named start
Starting named: [FAILED]

I just want to get to a point where I can see why its failing... any more ideas or notice something that I am doing wrong?

0
 
Gabriel OrozcoSolution ArchitectCommented:
brentrussell : don't overlook my post.

for the named start with debugging:
you are trying to start the named STARTUP SCRIPT (which does not have debug options), while what you want is start the named PROGRAM.

so use

named -d 1 -f

or simply

named -d 1

but do this *after* you correct your options section with the correct directory =)
0
 
brentrussellAuthor Commented:
Well all of my files were sym linked from /var/named
however, I changed it to /var/named/chroot/var/named and I got the following error when starting named:
(I also tried "/var/named/chroot/var/named/")

Starting named:
Error in named configuration:
/etc/named.conf:2: change directory to '/var/named/chroot/var/named' failed: file not found

/etc/named.conf:2: parsing failed
[FAILED]

I double checked to make sure that the dir is actually there and it is

When I did these:named -d 1 -f,  named -d 1 It just brought me back to a prompt again

FYI: /var/named/chroot/var/named/ contains my root.hint and 127.0.0.zone and localdomain.zone etc
0
 
lhboiCommented:
Hi brentrussel,
Your named runs in chroot environment. It means that its root directory is /var/named/chroot. And it sees your config file as /etc/named.conf and zone files as they are under /var/named. To be clear, please move your /etc/named.conf and zone files in /var/named to somewhere else, you don't need them. You only have to work with files under /var/named/chroot and remember that your named sees them as under /
Hope this help.
0
 
Gabriel OrozcoSolution ArchitectCommented:
or

move your actual files to these directories
0
 
brentrussellAuthor Commented:
Well I that answers my question on why it was not working. I have since reinstalled Suse over it. It gives me a good config to start with. Its not chrooted (Im not used to chrooted) Thanks for your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.