DNS service error questions
i am totally new to dns and learning it through tldp.org docs.
when i restart nameed service it says Stopping named: [FAILED] Starting named: [ OK ] i have rndc.conf file , but i couldn't have rndc service when i try rndc start it says connection refused. for reference #/etc/named.conf options { directory "/var/named"; // Uncommenting this might help if you have to go through a // firewall and things are not working out. But you probably // need to talk to your firewall admin. // query-source port 53; }; key "rndc-key" { algorithm hmac-md5; secret "+3QI4eySOTZVn4zgC9k4Tg=="; }; controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; }; }; zone "." { type hint; file "root.hints"; }; zone "0.0.127.in-addr.arpa" { type master; file "named/127.0.0"; }; More files can be provided on demand -jack |
hi
i think your /etc/named.conf file is incomplete.can u update with the zone name which u want to create and with the complete named.conf configuration. regards lenin |
That looks pretty close to the correct config for a caching-only DNS server. I don't see the allow recursion option, though.
The fastest way to configure rndc correctly is to remove /etc/rndc.conf and comment out the rndc key lines in /etc/named.conf, then run rndc-confgen -a, which should create all the appropriate entries. You should only have to shutdown and restart named from there. |
thanx chort for your response,
I am totally newbie to dns and i am learning from here http://tldp.org/HOWTO/DNS-HOWTO-3.html so , please tell newbie how to configure allow recursive option, i had already regenrated the rndc key with rndc-confgen command placed it in rndc.conf and named.conf file. but as u told to remove the rndc.conf file and regenerate with rndc-confgen -a , i done that but still named could not be start. for reference #tail -f 10 /var/log/messages Sep 22 15:39:25 mandrake named[2944]: using 1 CPU Sep 22 15:39:25 mandrake named[2946]: loading configuration from '/etc/named.conf' Sep 22 15:39:25 mandrake named: named startup succeeded Sep 22 15:39:25 mandrake named[2946]: no IPv6 interfaces found Sep 22 15:39:25 mandrake named[2946]: listening on IPv4 interface lo, 127.0.0.1#53 Sep 22 15:39:25 mandrake named[2946]: listening on IPv4 interface eth0, 192.168.1.2#53 Sep 22 15:39:25 mandrake named[2946]: command channel listening on 127.0.0.1#953 Sep 22 15:39:25 mandrake named[2946]: couldn't open pid file '/var/run/named.pid': Permission denied Sep 22 15:39:25 mandrake named[2946]: exiting (due to early fatal error) Sep 22 15:39:28 mandrake named: named shutdown failed -jack |
service named restart
what command are you using to restart named? this sounds like a script error in "/etc/rc.d/init.d/named". in redhat, you could get this message if you are are running "/usr/sbin/./named" directly. open a terminal, make sure you are the root user, and type service named restart.
|
Sep 22 15:39:25 mandrake named[2946]: couldn't open pid file '/var/run/named.pid': Permission denied
You must be starting named with the -u parameter. If so, you will need to create a directory that is owned by the user specifed by the -u parameter (usually named) along with the appropiate changes in named.conf. For reference, this is what I use Code:
// ---------------------------------------------------------------- Finally, the corresponding directory structure/ownership for the above. Code:
[root@voyager log]# cd /var/run |
thanks rioguia && scowles
@rioguia Quote:
# /etc/init.d/named restart Stopping named: [FAILED] Starting named: [ OK ] but when i did this same error, # service named restart Stopping named: [FAILED] Starting named: [ OK ] @scowles could u plz tell me specific command to start named using 'u' switch. |
Just kill it' pid and start it again. I've never managed to make named restart. It only starts a new process
|
there is no such process running when i checked with ps x|grep named
any other idea ?? |
Check with ps aux|grep named (as it ususally run as user named)
named is started with: Code:
/path/to/named -u named |
$ ps aux|grep named
emailssent 2865 0.0 0.5 1828 604 pts/1 R 16:34 0:00 grep named $ kill -9 2865 bash: kill: (2865) - No such process $ ps aux|grep named emailssent 2869 0.0 0.5 1828 604 pts/1 R 16:34 0:00 grep named $ kill -9 2869 bash: kill: (2869) - No such process $ ps aux|grep named emailssent 2871 0.0 0.5 1828 604 pts/1 R 16:34 0:00 grep named |
So named is not running. Check your /var/log/messages to find out why it does not start.
|
Sep 24 16:55:28 mandrake named[2943]: starting BIND 9.2.3rc2 -u named
Sep 24 16:55:28 mandrake named[2943]: using 1 CPU Sep 24 16:55:28 mandrake named: named startup succeeded Sep 24 16:55:28 mandrake named[2951]: loading configuration from '/etc/named.conf' Sep 24 16:55:28 mandrake named[2951]: no IPv6 interfaces found Sep 24 16:55:28 mandrake named[2951]: listening on IPv4 interface lo, 127.0.0.1#53 Sep 24 16:55:28 mandrake named[2951]: listening on IPv4 interface eth0, 192.168.1.2#53 Sep 24 16:55:28 mandrake named[2951]: command channel listening on 127.0.0.1#953 Sep 24 16:55:28 mandrake named[2951]: couldn't open pid file '/var/run/named.pid': Permission denied Sep 24 16:55:28 mandrake named[2951]: exiting (due to early fatal error) |
couldn't open pid file '/var/run/named.pid': Permission denied
You're named.conf file is still referencing the option pid-file "/var/run/named.pid" instead of /var/run/named/named.pid. See post #6 of this thread. |
You have wrong permissions in /var/run where named tries to write it's pid. So do as scowles suggested, i.e create the directory named under /var/run, then:
Code:
chown -R named:named /var/run/named Code:
pid-file "/var/run/named/named.pid"; |
All times are GMT -5. The time now is 12:57 AM. |