Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've been wracking my brain the last few days trying to setup DJBDNS on my server. I haven't been having too much luck. I have been following the guide provided by the creator of DJBDNS: http://cr.yp.to/djbdns/run-server.html

Here is a run-through of where I am:

Both services are up:

[root@Happycat tinydns]$ svstat /service/tinydns/
/service/tinydns/: up (pid 18224) 74454 seconds
[root@Happycat tinydns]$ svstat /service/dnscache/
/service/dnscache/: up (pid 2733) 2184 seconds

My /etc/resolv.conf file:

nameserver 127.0.0.1

My $PATH:

[root@Happycat ~]$ echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/sbin:/usr/sbin:/var/qmail/bin/:/usr/nexkit/bin:/root/bin

My tinydns/root/data records:

..:69.160.56.65:a:259200
.ns1.benwilk.com:69.160.56.65:a:259200
.ns2.benwilk.com:69.160.56.65:a:259200
.56.160.69.in-addr.arpa:69.160.56.65:a:259200
.56.160.69.in-addr.arpa:69.160.56.65:b:259200
=benwilk.com:69.160.56.65:86400
=openbarrel.net:69.160.56.65:86400
+www.openbarrel.net:69.160.56.65:86400
+www.benwilk.com:69.160.56.65:86400

Tiny dns can recognize the records set:

[root@Happycat root]$ tinydns-get a benwilk.com
1 benwilk.com:
78 bytes, 1+1+1+1 records, response, authoritative, noerror
query: 1 benwilk.com
answer: benwilk.com 86400 A 69.160.56.65
authority: . 259200 NS a.ns
additional: a.ns 259200 A 69.160.56.65

But then it comes to a grinding halt:

svscan /service/tinydns/
supervise: fatal: unable to start env/run: file does not exist
supervise: fatal: unable to acquire log/supervise/lock: temporary failure
supervise: fatal: unable to start supervise/run: file does not exist
supervise: fatal: unable to start root/run: file does not exist
supervise: fatal: unable to start env/run: file does not exist
supervise: fatal: unable to start supervise/run: file does not exist
supervise: fatal: unable to start root/run: file does not exist
supervise: fatal: unable to start env/run: file does not exist
supervise: fatal: unable to start supervise/run: file does not exist
supervise: fatal: unable to start root/run: file does not exist
supervise: fatal: unable to start env/run: file does not exist
supervise: fatal: unable to start supervise/run: file does not exist
supervise: fatal: unable to start root/run: file does not exist
supervise: fatal: unable to start env/run: file does not exist
supervise: fatal: unable to start supervise/run: file does not exist
supervise: fatal: unable to start root/run: file does not exist
supervise: fatal: unable to acquire log/supervise/lock: temporary failure
supervise: fatal: unable to start env/run: file does not exist
supervise: fatal: unable to start supervise/run: file does not exist
supervise: fatal: unable to start root/run: file does not exist

I'm assuming I have to set something with DNScache, and to be honest, it gets a bit confusing. I'm not sure whether to set it's IP address to 127.0.0.1 or one of the other IP addresses on the system. What am I missing from here?

share|improve this question
    
What does your $PATH look like? –  Ansgar Wiechers Sep 3 '12 at 2:12
1  
This looks like a problem in your startup scripts rather than djbdns or even daemontools. Try to take down svscan. Enter /service/dnscache, run "./run" manually and query it repeatedly to see how it behaves. If that works, work it up to daemontools: run supervise manually and test. Btw, looks like you installed daemontools from sources. Why not using your distribution's package for convenience? –  michele Nov 26 '12 at 22:01
    
Is svscan /service/tinydns the command you're running? svscan should be passed a path to a directory-of-services (i.e. svscan /service), and then it looks for subdirectories of that directory to treat as services. –  nickgrim Mar 7 '13 at 12:19

1 Answer 1

TinyDNS and DNScache are fully independent. Just make sure you're not trying to bind them on the same address, as they both need UDP port 53.

Usually you run dnscache on 127.0.0.1:53 and tinydns on public:53. Verify this in the respective env/IP files of both services.

Here's the procedure to troubleshoot services not starting. Assume you start with tinydns.

  1. Take down tinydns:

    svc -d /service/tinydns

  2. check that there are no other instances of tinydns running:

    ps ax | grep tinydns ; killall tinydns

  3. enter the service directory and run the service interactively:

    cd /service/tinydns ./run

If this works, work it out at the daemontools level. Take them down from your startup script and run them manually:

svscan /service

If this works, the problem is in the scripts you use to start up daemontools itself. On linux that's often /etc/inittab or /etc/init/svscan.conf . On FreeBSD /usr/local/etc/rc.d/svscan .

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.