running multiple daemonized instances of BIND9.2 on Windows 2000

Danny Mayer mayer at gis.net
Sat Dec 27 02:55:49 UTC 2003


At 08:04 PM 12/11/03, Michael wrote:
>----- Original Message -----
>From: "Nick" <nickjeffrey at hotmail.com>
>Newsgroups: comp.protocols.dns.bind
>Sent: Monday, November 03, 2003 1:29 PM
>Subject: Re: running multiple daemonized instances of BIND9.2 on Windows
>2000
>
>
> > Here's the answer you've all been waiting for with baited breath!
> > Please be careful with line breaks if you're cutting/pasting this into
> > one of your own systems.
>
>[snipped instructions]
>
>Nick,
>
>I tried your above instructions and I couldn't get them to work.  I did
>something similar using "SC" to create the service and I found that this
>setup had the same results.  The steps are this:
>
>  - I create the services
>  - I setup three different named.conf files
>  - I start the services
>
>When I start the services, they *still* try to look for a configuration file
>under c:\winnt\system32\dns\etc\named.conf which of course does not exist.

What Nick didn't tell you (maybe he doesn't know) is that when you run
BIND as a service it gets the information it needs to find the named.conf
file from the Registry Key, specifically:
"HKEY_LOCAL_MACHINE\Software\ISC\BIND" where it gets the key value
of InstallDir. It then appends to it etc\named.conf to get the configuration
file. It can't be changed without changing the code.

>If I start all three under a command line:
>
>named -f -c c:\bind\conf\named-bebe.conf
>named -f -c c:\bind\conf\named-sandy.conf
>named -f -c c:\bind\conf\named-katsu.conf
>
>...then the services run fine, they listen on their appropriate IPs, and
>they give all the right answers.

That's because it's not running as a service.

>   The problem of course is that we don't
>want three command windows open...we just want to run it as a background
>daemon and due to some political workings, we simply can't run a Linux/Unix
>solution (which would make this problem trivial).

The code would need to be changed to have the command line override the
defaults for a service. That's probably the right thing to do.

>You and Danny talked about "views", but I don't think that that solution
>fits our needs.  Here's our situation:
>
>  - We have a product that has Internet features associated to it
>
>  - The product has a hard-coded DNS look up for three entries...let's call
>them:
>     chat.sandycat.com
>     mouse.sandycat.com
>     flapper.sandycat.com
>
>  - We have multiple test environments at our company, some of which run the
>retail version of our product.  So what do we do if we want to connect to a
>particular environment?  We just setup a DNS server and fake it into
>connecting to one of the environments.
>
>So in other words, at any point in time, any host might want to connect to
>any particular environment.  It seems that wiews would make the connections
>host based and it's not guaranteed (in fact, it'd never be the case) that a
>particular host would always want to go to a particular environment.

You are right, views probably won't help you here.

>Is there something in your instructions that you perhaps missed?  Why does
>it seem to ignore my parameters when I start it as a service?
>
>When I initially tried doing it, I used sc to just create a service where
>the binPath was the full command:
>
>c:\bind\named.exe -c c:\bind\conf\named-sandy.conf
>
>This also created a bunch of errors in the Event Viewer basically stating
>that c:\winnt\system32\dns\etc\named.conf did not exist.

See above. The code would need to be changed to do this.

Danny

>Any help/suggestions would be appreciated!
>
>
>Michael
>



More information about the bind-users mailing list