BIND - zone not loaded due to errors

After upgrading from Ubuntu 8.04 to 10.04 my DNS isn't working properly anymore.

I keep getting this error when I run named-checkzone example.com /var/cache/bind/example.com.zone.db

zone example.com/IN: NS 'mx002a.example.com' has no address records (A or AAAA)
zone example.com/IN: not loaded due to errors.

in /var/cached/bind/example.com.db

$TTL 3D
@       IN      SOA     mx002a.example.com. chantra.example.com. (
                        200608081       ; serial, todays date + todays serial #
                        8H              ; refresh, seconds
                        2H              ; retry, seconds
                        4W              ; expire, seconds
                        1D )            ; minimum, seconds
;
;
mx002a.example.com IN A 192.168.85.19
example.com. IN NS mx002a.example.com.
mx001           60 IN A 192.168.85.17
mx001           60 IN A 192.168.85.18

Solution 1:

You must either specify the FQDN of everything in the zone file, or set $ORIGIN. Also, if you specify an FQDN, you must specify it with a trailing dot (this is why it doesn't see your A record for mx002a.example.com).

To fix it:

$TTL 3D
$ORIGIN example.com.

@       IN      SOA     mx002a.example.com. chantra.example.com. (
                        200608081       ; serial, todays date + todays serial #
                        8H              ; refresh, seconds
                        2H              ; retry, seconds
                        4W              ; expire, seconds
                        1D )            ; minimum, seconds
;
;
@               IN NS mx002a.example.com.
mx002a          IN A 192.168.85.19
mx001           60 IN A 192.168.85.17
mx001           60 IN A 192.168.85.18

@ is a shortcut for just the origin.