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.

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.

share|improve this question
    
Do they resolve? –  Warner Feb 25 '10 at 19:13
    
@Warner I can ping them correctly, yes. –  Cromulent Feb 25 '10 at 19:19

4 Answers 4

up vote 2 down vote accepted

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?

share|improve this answer
    
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 '10 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? –  Andy Shellam Feb 25 '10 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? –  Andy Shellam Feb 25 '10 at 21:01
1  
And, as Michael Graff, post the real domain names, otherwise it is useless, we can just guess. –  bortzmeyer Mar 1 '10 at 9:48

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.

share|improve this answer

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>
share|improve this answer

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...

share|improve this answer
    
named-checkzone's error message shows that it is not the issue –  bortzmeyer Mar 1 '10 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). –  quadruplebucky Mar 1 '10 at 12:47

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.