Named can't create .pid?!?!?
Ok, Im trying to get BIND 9.2 to run on my Redhat 7.1 box, and all is working possibly ok except for 1 thing.....
Named starts up just fine from xinetd, no problems at all. however if I kill it and do: /usr/sbin/named My /var/log/messages reads: Sep 24 16:23:49 ns3 named[1123]: starting BIND 9.2.1 Sep 24 16:23:49 ns3 named[1123]: using 1 CPU Sep 24 16:23:49 ns3 named[1125]: loading configuration from '/etc/named.conf' Sep 24 16:23:49 ns3 named[1125]: no IPv6 interfaces found Sep 24 16:23:49 ns3 named[1125]: listening on IPv4 interface lo, 127.0.0.1#53 Sep 24 16:23:49 ns3 named[1125]: listening on IPv4 interface eth0, 204.57.74.90#53 Sep 24 16:23:49 ns3 named[1125]: command channel listening on 127.0.0.1#953 Sep 24 16:23:49 ns3 named[1125]: couldn't open pid file '/var/run/named/named.pid': Permission denied Sep 24 16:23:49 ns3 named[1125]: exiting (due to early fatal error) So, I have no idea what to do, I have several other pids in there (ssh, and a few others) but I can't get named to start from the command line-but if i reboot the server it starts up fine. Anyone have any ideas? Im stumped! |
well does the file not exist already? there might be a stale one without permissions to it. who are you running the server as? do they have rights? how are you running it from the command line?
|
Running as root and i did a 'find / -name named.pid'
and found nothing..... Im using the command: /usr/sbin/named |
as any user, do:
ls -l /var/run/named/named.pid check the user/group on that file, if it is something other than root run named like /usr/sbin/named -gu <username> now, try to understand what user named is running as, you might want to read the DNS howto located at tldp.org if that file doesn't exist for whatever reason, despite your error message claiming otherwise, do: touch /var/run/named/named.pid be warned! running named as root is a Bad Idea |
What do you mean understand what username? The username is 'named', apparently he doesn't have permission to the named.pid, what should the file permissions be for the named.pid ?
|
Quote:
understand why named is running as such, figure out if said usename is in the passwd file, and such named is probably changing to the user nobody at started. add the -u named to the command will fix that. I was trying to show him the answer, not tell him. named.pid should be 600, owned by whatever user you want named to run as (typically named). |
Oh I thought that went without saying =)
I understand the basics of file perms, users, and groups named starts up as named, and runs as named not 'nobody' (like say apache or my bnc or eggdrop bot). The file named.pid was set to 544, chaning it to 600 didnt work..... like i said it runs FINE at startup, but if i kill it and try to run it/usr/sbin named i get that in my /var/msg/log it doesnt say ANYTHING at the prompt..... |
Quote:
to get error messages display and not logged, and run named in the forground, run named -g try running named -gu named |
\that worked! running it as named -gu named worked, so i took the g off (named -u named) and tada, thanks Im not sure why I didnt think of that one myself =)
|
you should run it as a proper service anyway
service start named or /etc/init.d/named start |
If you're kill named because you made changes in named's database, instead of killing it, do:
kill -1 <named-pid> This will force named to re-read all it's configuration files. -mk |
yes!!
Quote:
|
All times are GMT -5. The time now is 08:49 PM. |