LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   DNS weirdness (https://www.linuxquestions.org/questions/linux-newbie-8/dns-weirdness-45092/)

snowdog12 02-12-2003 11:22 AM

DNS weirdness
 
OS: RH 7.2 Bind version: 9.2.0
I migrated a Qmail server from one box to another by installing RH 7.2 on some new hardware, installing Qmail, et. al., and copying over the /etc/passwd+shadow files, moving home directories, copying zone files, etc, basically all of what I believed to be the essential config files for various services. The old server was running RH6.2, and Bind 8.2.

My problem is this: I went to make a hostname change in one of the zone files I copied over, and then assumed I would need to do this:

/etc/rc.d/init.d/named reload

but got this error:

/etc/rc.d/init.d/named: /usr/sbin/ndc: No such file or directory

Anyone have any idea on what's causing this, or what I can do to fix it? Also, it looks like named has about 6 processes of itself running simultaneously, is that normal behavior?

rnturn 02-12-2003 12:50 PM

Re: DNS weirdness
 
Quote:

Originally posted by snowdog12
My problem is this: I went to make a hostname change in one of the zone files I copied over, and then assumed I would need to do this:

/etc/rc.d/init.d/named reload

but got this error:

/etc/rc.d/init.d/named: /usr/sbin/ndc: No such file or directory

You probably have 5-6 instances of httpd running as well. (Not sure why they do this by default. :-( )

I can't help on that specific file (since I'm not running bind on the Linux box I have on hand at this time) but the first place I'd start looking is the ``/etc/rc.d/init.d/named'' script. Find where it's referencing that file and you can usually figure out how it came to that section of the script.

Did you really need to migrate your DNS along with qmail?

Quote:


Also, it looks like named has about 6 processes of itself running simultaneously, is that normal behavior?

Unless you're setting this up to be a DNS for a pretty good sized network, you should be able to reduce the number of instances of named that are running. I seem to remember that this is set by a variable in the named start up script (the one that issued the message you posted). You can change this value to something that you think is more appropriate. If name resolution seems to be `pokey' you can increase it until things seem zippier. Just remember to name a backup copy of the script (for example: ``cp named named.before_todaysdate-timeofday'') in case you accidently introduce a mysterious error with a typo.

Hope this helps,

Rick

snowdog12 02-12-2003 01:49 PM

Follow up question
 
Rick,

It actually helps enormously, and points me in the right direction I think. In the /etc/rc.d/init.d/named script, its calling /usr/sbin/ndc, which doesn't exist on my system. I seem to remember that in Bind9.x, ndc is/was replaced by rndc. If I manually edit and change it to point to that executable, am I going to hose anything? This is now a production server, hence my fear.

- John

rnturn 02-12-2003 07:08 PM

Re: Follow up question
 
Quote:

Originally posted by snowdog12
Rick,

It actually helps enormously, and points me in the right direction I think. In the /etc/rc.d/init.d/named script, its calling /usr/sbin/ndc, which doesn't exist on my system. I seem to remember that in Bind9.x, ndc is/was replaced by rndc. If I manually edit and change it to point to that executable, am I going to hose anything? This is now a production server, hence my fear.

- John

I'm pretty sure that rndc is a drop-in replacement for ndc. You could make a backup copy of the named script and change the occurances of `ndc' to `rncd'. I'd make a backup copy of /etc/named.conf and the named database listed on the `directory' record in named.conf (for my case, I'd `` cd /var ; tar cvf named.tar named/* '')... just in case. Then run `/etc/rc.d/init.d/named start' and make sure no fatal messages were sent to /var/log/messages.

But, ouch! I just remembered that you're upgrading from Bind 8 to Bind 9. There were, if memory serves, some gotchas when I tried just copying the old V8 files and using them with V9. Can't remember just what the problem was. I spent some time with the Bind 9 docs I downloaded from
Nominum before I got it up and running. (The version of the O'Rielly book that I had back then was outdated; it's been updated since which is good as I can no longer find the nice Bind manual on Nominum's site!!) That's why I was asking about whether you really needed to move the DNS to RH7.x just now. I'd leave the V8 DNS up and running until you get something working using V9 (set up a workstation where resolv.conf points to the V9 test setup). That way you wouldn't lose the ability to do name resolution while you're debugging the Bind 9 configuration.

Good luck,

Rick

snowdog12 02-13-2003 04:32 PM

moved back to 8.2 - kinda?
 
Ok, so here's what I did: I copied /usr/sbin/named and /usr/sbin/ndc over to the new system, killed named and restarted it, and now it comes up just fine as 8.2 (bearing in mind that all the .conf and /var/named files were from the old system). It seems to be working just fine now, and is responding to command line arguments ok, and /var/log/messages is reporting it to be seemingly happy.

So, my final rambling question is: did I do the right thing? Can you really just copy over the binaries and config files like that from one system to another?

I plan on upgrading to 9.2.x at some point, but security isn't a huge scare for me since this isn't a public DNS server but rather is behind a firewall. It only accepts queries from local hosts on my 10.x LAN.

rnturn 02-13-2003 07:45 PM

Re: moved back to 8.2 - kinda?
 
Quote:

Originally posted by snowdog12
Ok, so here's what I did:

...snip...

So, my final rambling question is: did I do the right thing? Can you really just copy over the binaries and config files like that from one system to another?

Well, I'm guessing that your copy operation obliterated the V9.x named binary. So if you decide to upgrade you'll have to reinstall that rpm. Personally, I would have just done ``mv named named.v9'' or something like that before I did the copy.

As for it working, you pretty much demonstrated that it does, eh? If it wasn't going to work you would have found out almost immediately.
Quote:


I plan on upgrading to 9.2.x at some point, but security isn't a huge scare for me since this isn't a public DNS server but rather is behind a firewall. It only accepts queries from local hosts on my 10.x LAN.

As long as your not allowing any inbound DNS requests to get to the internal ehternet interface you should be OK.

Have fun!

Rick


All times are GMT -5. The time now is 04:34 PM.