LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-31-2012, 07:24 AM   #1
themande
LQ Newbie
 
Registered: Jun 2011
Location: Pune, India
Distribution: CentOS6
Posts: 20

Rep: Reputation: 0
dns error ** server can't find server1: SERVFAIL


Hi,

I have configured two machines in my network.

1. service1.example.com (This is my DNS server)
2. server1.example.com (This is my client machine)

When I am running nslookup server1 I get below error message.
Quote:
[root@server1 Desktop]# nslookup server1
Server: 192.168.6.254
Address: 192.168.6.254#53

** server can't find server1: SERVFAIL
But when I run nslookup server1.example.com I get correct response.
Quote:
[root@server1 Desktop]# nslookup server1.example.com
Server: 192.168.6.254
Address: 192.168.6.254#53

Name: server1.example.com
Address: 192.168.6.101
Same is applicable with dig command

Quote:
[root@server1 Desktop]# dig server1

; <<>> DiG 9.7.0-P2-RedHat-9.7.0-5.P2.el6 <<>> server1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 1768
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;server1. IN A

;; Query time: 7 msec
;; SERVER: 192.168.6.254#53(192.168.6.254)
;; WHEN: Sat Mar 31 05:08:38 2012
;; MSG SIZE rcvd: 25

[root@server1 Desktop]# dig server1.example.com

; <<>> DiG 9.7.0-P2-RedHat-9.7.0-5.P2.el6 <<>> server1.example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43085
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;server1.example.com. IN A

;; ANSWER SECTION:
server1.example.com. 86400 IN A 192.168.6.101

;; AUTHORITY SECTION:
example.com. 86400 IN NS service1.example.com.

;; ADDITIONAL SECTION:
service1.example.com. 86400 IN A 192.168.6.254

;; Query time: 2 msec
;; SERVER: 192.168.6.254#53(192.168.6.254)
;; WHEN: Sat Mar 31 05:08:45 2012
;; MSG SIZE rcvd: 92
I have below configuration for /etc/named.conf file


Quote:
[root@service1 Desktop]# 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 { 127.0.0.1;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 { localhost;any;};
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

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

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

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

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

zone "example.com" {
type master;
file "example.com.zone";
allow-update {none;};
};

zone "6.168.192.in-addr.arpa" IN {
type master;
file "example.com.rev.zone";
allow-update {none;};
};
forward and reverse zone files.

Quote:
[root@service1 Desktop]# cat /var/named/example.com.zone
$ORIGIN example.com.
$TTL 1D
@ IN SOA service1.example.com. amit.example.com. (
20120331 ; serial
6H ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS service1.example.com.
service1 IN A 192.168.6.254
server1 IN A 192.168.6.101
tester1 IN A 192.168.6.102
example.com. IN MX 10 server1.example.com.
[root@service1 Desktop]# cat /var/named/example.com.rev.zone
$ORIGIN 6.168.192.in-addr.arpa.
$TTL 1D
@ IN SOA service1.example.com. amit.example.com. (
20120331 ; serial
6H ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS service1.example.com.
101 IN PTR server1.example.com.
102 IN PTR tester1.example.com.
254 IN PTR service1.example.com.
Please let me know if there is any mistake in configuration. I am using CentOS version 6.

Quote:
[root@service1 data]# tail -f named.run
error (network unreachable) resolving 'server1/A/IN': 128.63.2.53#53
error (network unreachable) resolving 'server1/A/IN': 192.5.5.241#53
error (network unreachable) resolving 'server1/A/IN': 193.0.14.129#53
error (network unreachable) resolving 'server1/A/IN': 198.41.0.4#53
error (network unreachable) resolving 'server1/A/IN': 199.7.83.42#53
error (network unreachable) resolving 'server1/A/IN': 202.12.27.33#53
error (network unreachable) resolving 'server1/A/IN': 192.58.128.30#53
error (network unreachable) resolving 'server1/A/IN': 192.112.36.4#53
error (network unreachable) resolving 'server1/A/IN': 192.36.148.17#53
error (network unreachable) resolving 'server1/A/IN': 192.203.230.10#53
error (network unreachable) resolving 'server1/A/IN': 192.228.79.201#53
error (network unreachable) resolving 'server1/A/IN': 192.33.4.12#53
error (network unreachable) resolving 'server1/A/IN': 128.8.10.90#53
error (network unreachable) resolving 'service1/A/IN': 128.63.2.53#53
error (network unreachable) resolving 'service1/A/IN': 192.5.5.241#53
error (network unreachable) resolving 'service1/A/IN': 193.0.14.129#53
error (network unreachable) resolving 'service1/A/IN': 198.41.0.4#53
error (network unreachable) resolving 'service1/A/IN': 192.58.128.30#53
error (network unreachable) resolving 'service1/A/IN': 199.7.83.42#53
error (network unreachable) resolving 'service1/A/IN': 202.12.27.33#53
error (network unreachable) resolving 'service1/A/IN': 192.112.36.4#53
error (network unreachable) resolving 'service1/A/IN': 192.36.148.17#53
error (network unreachable) resolving 'service1/A/IN': 192.228.79.201#53
error (network unreachable) resolving 'service1/A/IN': 192.33.4.12#53
error (network unreachable) resolving 'service1/A/IN': 192.203.230.10#53
error (network unreachable) resolving 'service1/A/IN': 128.8.10.90#53
error (network unreachable) resolving 'tester1/A/IN': 128.63.2.53#53
error (network unreachable) resolving 'tester1/A/IN': 192.5.5.241#53
error (network unreachable) resolving 'tester1/A/IN': 193.0.14.129#53
error (network unreachable) resolving 'tester1/A/IN': 198.41.0.4#53
error (network unreachable) resolving 'tester1/A/IN': 192.58.128.30#53
error (network unreachable) resolving 'tester1/A/IN': 199.7.83.42#53
error (network unreachable) resolving 'tester1/A/IN': 202.12.27.33#53
error (network unreachable) resolving 'tester1/A/IN': 192.36.148.17#53
error (network unreachable) resolving 'tester1/A/IN': 192.112.36.4#53
error (network unreachable) resolving 'tester1/A/IN': 192.203.230.10#53
error (network unreachable) resolving 'tester1/A/IN': 128.8.10.90#53
error (network unreachable) resolving 'tester1/A/IN': 192.228.79.201#53
error (network unreachable) resolving 'tester1/A/IN': 192.33.4.12#53
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-31-2012, 07:31 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,339

Rep: Reputation: Disabled
From the dig query, it's evident that server1 is not configured with a default domain name:

Code:
;; QUESTION SECTION:
;server1.	 IN	A
Make sure /etc/resolv.conf on server1 contains the line search example.com.

Last edited by Ser Olmy; 03-31-2012 at 08:49 AM. Reason: Typo
 
2 members found this post helpful.
Old 03-31-2012, 07:34 AM   #3
themande
LQ Newbie
 
Registered: Jun 2011
Location: Pune, India
Distribution: CentOS6
Posts: 20

Original Poster
Rep: Reputation: 0
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
[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 failure error "wxp.bitproject.com : not found 2 (SERVFAIL) dezio Linux - Newbie 2 09-05-2010 02:25 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 - Server

All times are GMT -5. The time now is 08:24 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