could not start named.conf
Adriatik Allamani
aallamani at ert.gov.al
Tue Aug 14 06:30:02 UTC 2007
Thanks a lot for the help. To all of you.
On Mon, 2007-08-13 at 10:19 -0700, Chris Buxton wrote:
> On Aug 13, 2007, at 8:29 AM, Adriatik Allamani wrote:
> >> Adriatik Allamani napsal(a):
> >>> Aug 13 12:02:54 ns1 named[4449]: couldn't open pid file
> >>> '/var/run/named/named.pid': Permission denied
> >
> > Permission for /var/run/named is:
> >
> > drwxrwx--- 2 named named 4096 Jul 24 18:51 named
> >
> > Inside the /var/run/named directory has no named.pid, it is empty I
> > think??
> >
> > when I get in the folder, it has nothing. And ls -l command shows:
> >
> > total 0
>
> Are you starting named manually, or using the init script?
>
> Based on your BIND version and the location of the PID file, I'm
> going to guess you're using RHEL 4, CentOS 4, or some equivalent
> version of Fedora or other RH-derived OS. In which case, you should
> be using the following to start the service:
>
> service named start
>
This command is not recognized, when I try to start with: service named
start
it comes out:
bash: service: command not found
And "yes" I using CentOS4.
So I use to start manually and now it comes out this error:
Aug 14 07:22:33 ns1 named[4172]: starting BIND 9.2.4 -u named
Aug 14 07:22:33 ns1 named[4172]: using 2 CPUs
Aug 14 07:22:33 ns1 named[4172]: loading configuration from
'/etc/named.conf'
Aug 14 07:22:33 ns1 named[4172]: /etc/named.conf:12: 'directory'
redefined near 'directory'
Aug 14 07:22:33 ns1 named[4172]: loading configuration: already exists
Aug 14 07:22:33 ns1 named[4172]: exiting (due to fatal error)
named.conf file is below?
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
// Process environment
// directory "/local/var/named/run"; // Working directory
directory "/run"; // Working directory
(chroot'd)
pid-file "named.pid"; // Put pid file in working
directory
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "info.al" IN {
type master;
file "db.adrial.com";
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "db.127.0.0";
};
> If you choose to start it manually, make sure that you put "-u named"
> on the command line to change the process' user account to "named".
> Otherwise, you will get the error message above - the root user
> (after dropping superuser privileges) is unable to write to that
> directory.
>
> Chris Buxton
> Men & Mice
More information about the bind-users
mailing list