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

I am using tinydns behind dnscache to resolve machine names on a LAN, as installed on Ubuntu 10.04 LTS. Every so often without explanation, local names can no longer be resolved by any machine on the network. It seems that tinydns is no longer responding. Rebooting the server sometimes helps, however that is not how I run Unix servers. Killing tinydns also seems to work sometimes, but not always.

My overall experience trying to run a local DNS server has not been good, with careful tweaking of resolv.conf files and seemingly random failures of tinydns. If others have problems with djbdns, please let me know. DNS diagnostic tips are also helpful.

Update:

A quick check of the logs shows complaints about I/O failure, followed by a complaint about not being able to bond to the given address. Sometimes nothing is reported in the logs, the app simply stops responding.

Just a note on the setup, which had its own problems. The dnscache was run on eth0 at one IP address, and tinydns was initially run on eth0:0 on another IP address. (Setting up tinydns at 127.0.0.1 did not work at all, even though djb says that it should.) However, this setup (eth0:0) did not work on reboot, since Ubuntu has some problem starting eth0:0 automatically. Changing the alias to eth0:1 allowed the interface to come up automatically on reboot. this is more adventure than expected for a seemingly simple task.

For now, I am trying tinydns on a completely separate server, and will report back if that is stable.

share|improve this question
1  
What do your logs say about this? –  John Gardeniers Jan 24 '11 at 3:42
add comment

1 Answer

It's not the easiest to debug this, especially begin on UDP and with tinydns (hardcoded port 53).

First make sure you got the base configuration right:

  1. make sure dnscache and tinydns run on two different IP addresses (so they don't steal each other's socket)
  2. make sure your 127.0.0.1:53 is free, i.e. no other daemon listens there by the system (netstat -n)
  3. run tinydns on 127.0.0.1 and query it manually with dig yr-authoritative-dom.com @127.0.0.1. This MUST work always and reliably
  4. run dnscache on the public eth0 IP address. In your root/servers/ directory, point yr-authoritative-dom.com to 127.0.0.1 . In root/ip put 192.168 (or whatever address prefix you query from)

If this doesn't work, consider the following possibilities:

  • there is some problems with resource exhaustion. Try disabling dnscache logging altogether (rename the "log/run") temporarily and observe if the problem occurs again.
  • some other process is rebinding the IP:53 socket away from dnscache.
share|improve this answer
add comment

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.