8

Okay I've searched through this site and read the numerous questions all on the same topic but the puzzeling thing is that I do have an A record for both of my ns entries.

When I run named-checkzone on my reverse DNS records then I get this error:

zone example.com/IN: NS 'ns.example.com' has no address records (A or AAAA)

zone example.com/IN: NS 'ns2.example.com' has no address records (A or AAAA)

I'm obviously doing something stupid, but could anyone shed any light on what it exactly is, as I'm stumped on this one.

Here is my domain zone file:

$TTL    604800
@       IN      SOA    ns.example.com. root.example.com. (
                            12         ; Serial
                            604800     ; Refresh
                            86400      ; Retry
                            2419200    ; Expire
                            604800 )   ; Negative Cache TTL
@                        IN      NS      ns.example.com.
@                        IN      NS      ns2.example.com.
@                        IN      MX 10   mail.example.com.
@                        IN      A       192.168.1.109
example.com.             IN      A       192.168.1.109
ns      IN      A       192.168.1.109
ns2     IN      A       192.168.1.109
mail    IN      A       192.168.1.109
www     IN      A       192.168.1.109

and here is my reverse dns zone file:

$TTL    604800
@       IN      SOA    ns.example.com. root.example.com. (
                            9         ; Serial
                            604800    ; Refresh
                            86400     ; Retry
                            2419200   ; Expire
                            604800 )  ; Negative Cache TTL 
@       IN      NS      ns.example.com.
@       IN      NS     ns2.example.com.
109     IN      PTR    example.com.
109     IN      PTR    ns.example.com.
109     IN      PTR    ns2.example.com.

Thank you very much.

2
  • Do they resolve?
    – Warner
    Feb 25, 2010 at 19:13
  • @Warner I can ping them correctly, yes.
    – Cromulent
    Feb 25, 2010 at 19:19

4 Answers 4

3

Strange - copy and pasting your answer and running named-checkzone on it results in:

acshellam@dev1:/tmp$ named-checkzone example.com example.com.zone
zone example.com/IN: loaded serial 12
OK

acshellam@dev1:/tmp$ named-checkzone -v
9.6.1-P2

You sure that's the correct zone file you have on your system? Is there an $ORIGIN directive somewhere between the NS and the A records in your file that's changing the zone root?

4
  • It is when I run named-checkzone on the second file that I get the error message. The first one seems to be okay, I'm just fairly new to BIND so I want to make sure that everything is working correctly.
    – Cromulent
    Feb 25, 2010 at 19:42
  • Aaaah, I never clocked it was the reverse DNS zone, I assumed it was the first. Yes I do get the same. What does dig @your-server-ip ns.example.com NS result in? Does it give you the correct IP addresses back? Feb 25, 2010 at 21:01
  • Also is your domain delegated correctly from the root servers, or are you just setting up an internal domain that isn't registered externally? Feb 25, 2010 at 21:01
  • 1
    And, as Michael Graff, post the real domain names, otherwise it is useless, we can just guess.
    – bortzmeyer
    Mar 1, 2010 at 9:48
2

I've been caught on this before.

You can't check the reverse zone file with the same domain because you need to use the reverse domain.

Try the following:

named-checkzone 1.168.192.in-addr.arpa <reverse zone file>
1

What does dig @your-server-ip example.com soa say, and dig @your-server-ip 4.3.2.in-addr.arpa say? Replace the reverse zone with your actual reverse zone.

Are these both loaded into the same server?

What version of named-checkzone? What version of BIND?

If I had an actual IP address, or domain names to test, I could be a lot more help here.

-1

I think you are getting your arguments to named-checkzone munged.

I duplicate your error with:

q@y:~/foo$ named-checkzone example.com 1.168.192.in-addr.arpa
zone example.com/IN: NS 'ns.example.com' has no address records (A or AAAA)
zone example.com/IN: NS 'ns2.example.com' has no address records (A or AAAA)
zone example.com/IN: loaded serial 9
OK

The appropriate check for the reverse zone is: named-checkzone 1.168.192.in-addr.arpa 1.168.192.in-addr.arpa

My original answer below...

Try replacing the @ sign in the zone files with the actual zone you're trying to define...(@ is replaced with the zone variable string from named.conf, which I suspect may not be correct)

i.e. replace the first @ sign with "example.com." <-- note trailing dot

For the reverse file you'd replace it with the appropriate in-addr.arpa. line, depending...

2
  • named-checkzone's error message shows that it is not the issue
    – bortzmeyer
    Mar 1, 2010 at 9:47
  • Does it? I don't trust the named-checkzone output (we don't know how exactly he's running named-checkzone, and the @ expansion depends on the first argument). Mar 1, 2010 at 12:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .