?
Solved

named failed? Why

Posted on 2006-04-17
11
Medium Priority
?
364 Views
Last Modified: 2010-03-18
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.
0
Comment
Question by:brentrussell
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 27

Expert Comment

by:Nopius
ID: 16473934
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
 
LVL 1

Author Comment

by:brentrussell
ID: 16474169
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
 
LVL 27

Expert Comment

by:Nopius
ID: 16474206
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 16474302
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
 
LVL 1

Author Comment

by:brentrussell
ID: 16474563
[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
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 16474701
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
 
LVL 1

Author Comment

by:brentrussell
ID: 16474872
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
 
LVL 27

Accepted Solution

by:
Nopius earned 750 total points
ID: 16475127
probably you run your named from chroot-ed environment in that case symlinks will not work, only real copies of files/directories.
0
 
LVL 2

Assisted Solution

by:lhboi
lhboi earned 750 total points
ID: 16522292
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
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 16522329
or

move your actual files to these directories
0
 
LVL 1

Author Comment

by:brentrussell
ID: 16526642
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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Screencast - Getting to Know the Pipeline
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question