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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Artysystem administratorCommented:
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.
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?
Artysystem administratorCommented:
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
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

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
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?

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 =)
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
Artysystem administratorCommented:
probably you run your named from chroot-ed environment in that case symlinks will not work, only real copies of files/directories.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
Gabriel OrozcoSolution ArchitectCommented:
or

move your actual files to these directories
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.