MaraDNS troubleshooting guide

This troubleshooting guide is an example of how problems with MaraDNS may be resolved without needing to wait for support on the MaraDNS mailing list. This guide is a troubleshooting example that uses MaraDNS on a CentOS 3.8 system. People using MaraDNS on other systems will have to adapt this guide to suit their needs.

The problem we will troubleshoot in this example is MaraDNS not responding to DNS queries. As we will see in this guide, a number of different issues can cause this problem, and resolving the problem depends on what issue is causing the problem.

As just some of the possible issues, it is possible that the MaraDNS process is not running at all. It's possible that MaraDNS is running, but can't bind to the assigned IP (because of a Linux bug, MaraDNS can not accurately report this problem when run in Linux).

Here are some hints:

In the above mararc file, MaraDNS has the IP 127.0.0.1, would look for zone files in the directory /etc/maradns, and allows recursive DNS queries on the loopback interface.

OK, so let's look at some problems, as they appear on a CentOS 3.8 box with the above mararc file.

This is how things look when we don't have a loopback interface to bind to. Like in all examples in this guide, the '$' character indicates a line that we type data on; all other lines, including lines that start with '#', are lines created by the programs we are running in these examples.

$ askmara Awww.google.com.
# Querying the server with the IP 127.0.0.1
# Hard Error: Unable to send UDP packet!
Basically, the askmara client is unable to send a query because there is no way for it to contact a server on 127.0.0.1. Probably because there is no 127.0.0.1 to send the packet on. So, let's start troubleshooting.
$ export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
This gives us access to commands like ifconfig and what not.

$ su
Password:
type in your root password here

$ ifconfig lo 127.0.0.1
$ askmara Awww.google.com.
# Querying the server with the IP 127.0.0.1
# Hard Error: Timeout
OK, so let's restart MaraDNS:
$ /etc/rc.d/init.d/maradns restart
Sending all MaraDNS processes the TERM signal
waiting 1 second
Sending all MaraDNS processes the KILL signal
MaraDNS should have been stopped
Starting all maradns processes
Starting maradns process which uses Mararc file /etc/mararc
If /etc/rc.d/init.d/maradns restart doesn't generate the above output, this indicates that either MaraDNS was not correctly installed, or that you are using MaraDNS on another Linux/*NIX distribution. If you're not using CentOS or Red Hat Enterprise Linux, replace this command with the appropriate command for restarting a daemon/service for your operating system.

Now, lets look at some possible replies.

Server failure

$ askmara Awww.google.com.
# Querying the server with the IP 127.0.0.1
# Remote server said: SERVER FAILURE
# Question: Awww.google.com.
# NS replies:
# AR replies:
This is the askmara output when MaraDNS is running correctly but is unable to connect to DNS servers on the internet. This can be caused when the machine running MaraDNS does not have an internet connection, or when MaraDNS is being firewalled.

So, we get the internet connection up and going. If you have a working ethernet card and are on a network with internet access, this is as simple as making a DHCP request for an IP:

$ dhclient
Internet Systems Consortium DHCP Client V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

/sbin/dhclient-script: configuration for eth0 not found. Continuing
with defaults.
/sbin/dhclient-script: line 52: eth0: No existe el fichero o el directorio
Listening on LPF/eth0/00:40:f4:17:ac:e9
Sending on   LPF/eth0/00:40:f4:17:ac:e9
Listening on LPF/lo/
Sending on   LPF/lo/
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPOFFER from 10.1.2.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 10.1.2.1
/sbin/dhclient-script: configuration for eth0 not found. Continuing
with defaults.
/sbin/dhclient-script: line 52: eth0: No existe el fichero o el directorio
bound to 10.1.2.3 -- renewal in 255 seconds.
Note that if you are using something besides CentOS or Red Hat Enterprise Linux, the command for getting a DHCP lease may not be dhclient.

Now, the dhclient that CentOS 3.8 comes with is buggy, and breaks lo (the loopback interface which gives CentOS the 127.0.0.1 IP address). So, we have to fix lo again:

$ ifconfig lo 127.0.0.1
In addition, losing 127.0.0.1 breaks any service bound to 127.0.0.1, such as MaraDNS, so we have to rebind MaraDNS to 127.0.0.1:
$ /etc/rc.d/init.d/maradns restart
Sending all MaraDNS processes the TERM signal
waiting 1 second
Sending all MaraDNS processes the KILL signal
MaraDNS should have been stopped
Starting all maradns processes
Starting maradns process which uses Mararc file /etc/mararc
Keep in mind that MaraDNS binds to h./usr/share/doc/maradns/en/README0000644000000000000000000000125007422524152015301 0ustar rootrootPeople interested in translating documentation need only translate documentation in the "source/" directory; all user-level documentation is generated from these source files. The documentation is in a format called "ej"; ej is a format created to meet the needs of people who are translating MaraDNS documentation. The format is an XMLish format; in fact, it mostly resembles HTML. The converters which convert from "ej" to the various document formats are in the directory tools/ej. Currently there are three tools: ej2html, ej2man, and ej2txt, which, as expected, convert documents from the ej format to html, man page *roff source (using man macros), and to text format. ./usr/share/doc/maradns/en/QuickStart0000644000000000000000000000657610345360516016456 0ustar rootrootThis guide is for experienced UNIX/Liunx/BSD users who just want to quickly try out MaraDNS MaraDNS acts as both a recursive and an authoritative DNS server. In other words, MaraDNS can both be used to speed up the internet, and/or serve domains that you may have. To try out MaraDNS as a recursive nameserver is easy: * Compile MaraDNS. Type in './configure; make' in the top-level MaraDNS directory. Note: No need to compil