LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-12-2011, 08:06 PM   #1
malayo
Member
 
Registered: Dec 2010
Posts: 129

Rep: Reputation: 1
failed to query a zone (nsd3)


I tried playing with nsd3 on Debian 5 to create a light-weight nameserver on my cheaply vps. I found that I could not query the zone created with host even after i had pointed nameserver to localhost/127.0.0.1 in resolv.conf (querying from within the nsd server)

# host thechimchim.com
;; connection timed out; no servers could be reached

/etc/nsd3/nsd.conf

Code:
## NSD authoritative only DNS

server:
	ip-address: 10.10.10.10

	server-count: 1

	ip4-only: yes

	#hide-version: yes

	identity: ""

	zonesdir: "/etc/nsd3"

zone:
	name: thechimchim.com
	zonefile: thechimchim.com.forward

zone:
	name: 10.10.10.in-addr.arpa
	zonefile: thechimchim.com.reverse
/etc/nsd3/thechimchim.com.forward

Code:
;## forward zone - thechimchim.com.forward

$ORIGIN thechimchim.com.
$TTL 86400

@ IN SOA ns1.thechimchim.com. admin.thechimchim.com. (
	2011020701 ; serial no
	28800 ; refresh
	7200 ; retry
	86400 ; expire
	86400 ; min TTL
	)

	NS	ns1.thechimchim.com.
	MX	10 mail.thechimchim.com.

ns1	IN	A	10.10.10.10
mail	IN	A	10.10.10.10
*	IN	A	10.10.10.10
/etc/nsd3/thechimchim.com.reverse
Code:
;## REVERSE zone - thechimchim.com.reverse

$ORIGIN thechimchim.com.
$TTL 86400

10.10.10.in-addr.arpa. IN SOA ns1.thechimchim.com. admin.thechimchim.com. (
	2011020701 ; serial
	28800 ; refresh
	7200 ; retry
	864000 ; expire
	86400 ; TTL
	)

10.10.10.10.in-addr.arpa. IN	PTR ns1
10.10.10.10.in-addr.arpa. IN	PTR mail
when i rebuild nsdc db and reload nsdc, it says nsd not running

Last edited by malayo; 03-12-2011 at 08:16 PM.
 
Old 03-13-2011, 03:36 PM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
I haven't used nsd3, so my advice is somewhat generic. Off hand, I don' see anything obviously wrong in your zones files. You probably have a subtle syntax error in one of the configuration files. Sometimes when this happens, attempting to start the service does not cause output to stderr or stdout. Instead you need to look in the log files. Try syslog or messages unless nsd3 has its own log file, which would the first place to look. If the errors are obscure, putting the error message, or part of it, into Google with quotes can be helpful.
 
1 members found this post helpful.
Old 03-14-2011, 12:54 AM   #3
malayo
Member
 
Registered: Dec 2010
Posts: 129

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Noway2 View Post
I haven't used nsd3, so my advice is somewhat generic. Off hand, I don' see anything obviously wrong in your zones files. You probably have a subtle syntax error in one of the configuration files. Sometimes when this happens, attempting to start the service does not cause output to stderr or stdout. Instead you need to look in the log files. Try syslog or messages unless nsd3 has its own log file, which would the first place to look. If the errors are obscure, putting the error message, or part of it, into Google with quotes can be helpful.
hi, i set
logfile: "/var/log/nsd3.log" in server section in nsd.conf and got below messages in nsd3.log when i restarted nsd3

Code:
[1300081686] nsd[2649]: error: can't bind the socket: Cannot assign requested address
[1300081698] nsd[2705]: error: can't bind the socket: Cannot assign requested address
but googling doesn't give me any answer
 
Old 03-14-2011, 04:13 AM   #4
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
There are a couple of things that I can think of that can cause this problem:
  • attempting to assign an IP address not associated with the NIC
  • insufficient permissions
  • An bug in the application
  • the port already being in use

First, your post references the address of 10.10.10.10. While is is a valid private IP, I assume that it is false for the purposes of this post. Are you using the address of the NIC card in your configuration? If you have this behind a router, it will be the LAN IP, not your public IP.
Second, have you tried starting the application as root? Only a root owned process can open low numbered ports.
Third, perform a "netstat -pnl | grep 53" The p flag will list the process, n will give numeric output and l will show listening ports. This should be run as root / sudo and will tell you if something is already occupying the port. DNS will operate on UDP port 53.

You can also try setting the IP address to bind to in your configuration file to something like 127.0.0.1 or * to see if that helps. I agree that Googling for that error message with quotes isn't returning any hits and without it is giving generic ones. This is potentially a good sign that this ins't a common bug in the program.

Lastly, are there any other error entries in the log that could indicate a problem, like being unable to open a PID file or a log file not existing?
 
1 members found this post helpful.
Old 03-15-2011, 09:04 AM   #5
malayo
Member
 
Registered: Dec 2010
Posts: 129

Original Poster
Rep: Reputation: 1
thanks noway2, the problem is that there's a bind service that is still running even after i removed it. After i stopped it, then i could start nsd3 service and successfully run nsdc reload
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 zone query noony123 Linux - Newbie 3 02-24-2011 04:35 AM
Run script in EST time zone but server is in GMT zone jeesun Linux - Networking 1 04-04-2010 01:37 PM
the reverse lookup query failed in the connected devices and work in the DNS itself another 1 Linux - Newbie 1 04-09-2009 02:44 PM
Bind Query Logging per Zone? archangel_617b Linux - Server 1 03-04-2009 08:28 AM
Squid failed to query DNS romeo_tango Linux - Server 5 08-29-2008 04:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:51 PM.

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