2

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?

chicks
  • 3,793
  • 10
  • 27
  • 36
SecurityGate
  • 21
  • 1
  • 3
  • What does your `$PATH` look like? – Ansgar Wiechers Sep 03 '12 at 02: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
  • 1
    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 07 '13 at 12:19

1 Answers1

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.

muru
  • 589
  • 8
  • 26
michele
  • 585
  • 3
  • 7