Portal Home > Knowledgebase > Articles Database > DNS SERVFAIL error


DNS SERVFAIL error




Posted by timmyd, 04-30-2008, 01:16 AM
Hi all, I got a DNS problem and get a SERVFAIL back. I need your help to solve this, this is what i got: # host -t soa mydomain.com Host mydomain.com not found: 2(SERVFAIL) in the zone record i got (192.168.1.1 is just an example, there i got my server IP): $ttl 38400 @ IN SOA ns1.mydns.com. root.ns1.mydns.com. ( 1161897964 10800 3600 604800 38400 ) @ IN NS ns1.mydns.com. @ IN A 192.168.1.1 www IN A 192.168.1.1 ftp IN A 192.168.1.1 mydomain.com. IN NS ns2.mydns.com. I use Bind 9.0, Bind is running and port 65 is open: #53/tcp open domain Its all running on Centos. Any one can help? Appreciate it! cheerz tim

Posted by Lightwave, 04-30-2008, 01:28 AM
what does "port 65 is open" have to do with anything?

Posted by The_Overl, 04-30-2008, 02:09 AM
Check your syslog to see if the dns server loaded the zone properly. If you make even a small mistake in the zone file, the server will reject the whole zone. Usually the syslog will contain information on what the dns server didn't like, if thats the case...

Posted by timmyd, 04-30-2008, 02:17 AM
i've been looking for the log file of the DNS but i can't find them... where do i have to look? under syslog i got nothing. Ps. it's port 53, (typo)

Posted by The_Overl, 04-30-2008, 03:25 AM
I don't know where it might be on your distribution, I use Debian. Look in /var/log and see if you see anything.

Posted by cloud911, 04-30-2008, 03:35 AM
is your resolv.conf correct ? also check your hosts file.

Posted by timmyd, 04-30-2008, 03:54 AM
Overl about the log file... should it be set somewhere in the config file of named/dns where the log file is located? @227b i am checking again... and actually im not sure if the resolv.conf is correct... now i got something like this (again ip is not my ip but example ip) search mydns.com nameserver 192.168.0.0 nameserver 192.168.0.1 nameserver 192.168.0.2 however non of the ip address are mine. i think there are from the provider i host. What do i got to put there? And with the hosts file... that IS the file i posted (see above) or are you referring to something else..

Posted by cloud911, 04-30-2008, 10:54 AM
here is a good resolv.conf : nameserver 208.67.222.222 nameserver 208.67.220.220

Posted by timmyd, 04-30-2008, 11:05 PM
i searched again for the log files... and this time i got something. after restarting the dns i got this back: May 1 04:47:18 oldhostname named[5942]: zone mydomain.com/IN: loading master file /var/named/chroot/var/named/mydomain.com.hosts: file not found two things that are strange in this case: 1. the mydomain.com.hosts DOES exsist and has root rights and it returns the OLD hostname, i change the hostname cos i want to run all the domainname under the new domain i specially created for the DNS. However the old hostname i have changed in many parts already but still i shows here and there... dono why?!

Posted by ashish1987, 05-01-2008, 12:51 AM
Create a domain mydomain.com and then terminate it. This should rectify your BIND.

Posted by timmyd, 05-01-2008, 03:37 AM
it seemed that in the config file the zone where pointing to another location. If fixed that and now i can ping to mydomains.com however the second dns server returns still the IP address of the first dns for example when i do this: dig @ns1.mydns.com mydomain.com it returns IP 1.1.1.1 (for example) and when i do this dig @ns1.mydns.com mydomain.com i get the same IP? but that should be the IP of the second dns server... How do if fix that? and although i can ping to mydomains.com... in the browser i got nothing but a white page.. (but i am getting closer :-))

Posted by timmyd, 05-01-2008, 04:33 AM
some more testing.. and it seems that Bind still use the "old" directory too... if i delete a zone file from the previous location (/var/named/chroot/var/named/) coz i copied all zone file to the new location /var/named/ after rebooting the DNS the error comes back!!! error: named[5942]: zone mydomain.com/IN: loading master file var/named/chroot/var/named/mydomain.com.hosts: file not found so bind is getting the info from too different locations at the same time... Where do i set the path(s) that point Bind only to /var/named/ this will fix all the other bugs too. appreciate you help!

Posted by andren, 05-01-2008, 09:06 AM
usually /etc/named.conf

Posted by timmyd, 05-01-2008, 09:33 PM
thanks, (stupid enough, among the 100 zones who are in that file, only the 1 i tested with was still pointing to the old location) But if when i try to set my DNS server in an account such as GOdaddy, it doesn't accept it. I tried also another big domain hoster and got the same. It seems like that my DNS server is not in a DNS pool... for whatever that might be... How do i add my DNS to the Pool of DNS servers?

Posted by andren, 05-02-2008, 10:17 AM
You need to make sure your nameserver has a ns record in your zone file (an a record as well). Once that is there you can add it as a nameserver at godaddy.

Posted by timmyd, 05-02-2008, 09:33 PM
i think it has a ns record: $ttl 38400 @ IN SOA ns1.dnsdomain.com. root.ns1.dnsdomain.com. ( 1208578990 10800 3600 604800 38400 ) @ IN NS ns1.dnsdomain.com. @ IN NS ns2.dnsdomain.com. @ IN NS ns3.dnsdomain.com. @ IN A 99.99.999.999 *.@ IN A 99.99.999.999 www IN A 99.99.999.999 localhost IN A 127.0.0.1 (99.99.999.999: is my server IP) as a matter of fact i created these zones in the named.conf: zone "ns1.dnsdomain.com" { type master; file "/var/named/ns1.dnsdomain.com.hosts"; }; zone "ns2.dnsdomain.com" { type master; file "/var/named/ns2.dnsdomain.com.hosts"; }; zone "ns3.dnsdomain.com" { type master; file "/var/named/ns3.dnsdomain.com.hosts"; }; zone "dnsdomain.com" { type master; file "/var/named/dnsdomain.com.hosts"; };



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Security Scan (Views: 278)


Language:

Customer Testimonials

John Doe
It's a great service with fantastic support. It's definately good value for your money. Overall rating, 10 out of 10.
Mike Smith
Much better than my previous hosting company - I also got help with migration at no extra cost. Friendly support too.
Copyright © 2015 DC International LLC in partnership with Bragin IT Solutions Inc. - All Rights Reserved.