LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-23-2016, 12:44 PM   #1
To learn
LQ Newbie
 
Registered: Aug 2016
Posts: 11

Rep: Reputation: Disabled
Question DNS error: server can't find server1: SERVFAIL


Greetings to all.
I have configured two machines in my network.

1. apple.itssnp.edu.mx (This is my DNS server)
2. www.itssnp.edu.mx (This is my client machine)

When I am running nslookup www I get below error message.

Quote:
[root@apple usuariocc]# nslookup www
Server: 10.10.10.2
Address: 10.10.10.2#53

** server can't find www: SERVFAIL
But when I run nslookup www.itssnp.edu.mx I get correct response.

Quote:
[root@apple usuariocc]# nslookup www.itssnp.edu.mx
Server: 10.10.10.2
Address: 10.10.10.2#53

Name: www.itssnp.edu.mx
Address: 10.10.10.2
Same is applicable with dig command

Quote:
[root@apple usuariocc]# dig www

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> www
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 23700
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www. IN A

;; Query time: 35 msec
;; SERVER: 10.10.10.2#53(10.10.10.2)
;; WHEN: Tue Aug 23 10:33:52 2016
;; MSG SIZE rcvd: 21

[root@apple usuariocc]# dig www.itssnp.edu.mx

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> www.itssnp.edu.mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31083
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;www.itssnp.edu.mx. IN A

;; ANSWER SECTION:
www.itssnp.edu.mx. 86400 IN A 10.10.10.2

;; AUTHORITY SECTION:
itssnp.edu.mx. 86400 IN NS ns2.itssnp.edu.mx.
itssnp.edu.mx. 86400 IN NS ns1.itssnp.edu.mx.

;; ADDITIONAL SECTION:
ns1.itssnp.edu.mx. 86400 IN A 10.10.10.2
ns2.itssnp.edu.mx. 86400 IN A 10.10.10.1

;; Query time: 1 msec
;; SERVER: 10.10.10.2#53(10.10.10.2)
;; WHEN: Tue Aug 23 10:34:33 2016
;; MSG SIZE rcvd: 119
I have below configuration for /etc/named.conf file

Quote:
[root@apple usuariocc]# cat /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "named.ca";

};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

zone "itssnp.edu.mx" IN {
type master;
file "itssnp.db";
allow-transfer { 10.10.10.1; };

};
I have below configuration for /var/named/itssnp.db
file
Quote:
[root@apple usuariocc]# cat /var/named/itssnp.db
$TTL 1D
@ IN SOA @ webmaster.itssnp.edu.mx. (
2015030901 ; serial
1H ; refresh
1800 ; retry
1W ; expire
3H ) ; minimum
@ NS ns1
ns1 A 10.10.10.2
@ NS ns2
ns2 A 10.10.10.1

www A 10.10.10.2
apple A 10.10.10.2
 
Old 08-23-2016, 03:24 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Check for a search (or domain) line in /etc/resolv.conf.
If there is one, nslookup automatically appends that domain to the query, so perhaps there is a misconfigured domain in /etc/resolv.conf.

On the other hand for dig, you should add the "+search" option in order to add the domain from /etc/resolv.conf to the query name
Code:
dig www +search
I don't know why you get a SERVFAIL running dig, instead of a NXDOMAIN

BTW apple has the same IP as www in the zonefile posted. Are you sure it's correct?
 
1 members found this post helpful.
Old 08-29-2016, 11:58 AM   #3
To learn
LQ Newbie
 
Registered: Aug 2016
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thanks

That worked perfectly
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS server can't find www.localhost.com: SERVFAIL pandey Linux - Newbie 5 08-02-2016 01:48 AM
[SOLVED] dns error ** server can't find server1: SERVFAIL themande Linux - Server 2 03-31-2012 07:34 AM
[SOLVED] error "server can't find 254.0.168.192.in-addr.arpa: SERVFAIL" in dns server piyusharora420 Linux - Server 15 01-10-2011 01:06 AM
DNS SERVER WITH ERROR: "Server Can't Find : SERVFAIL" jcvalim Linux - Server 52 05-21-2009 02:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration