View previous topic :: View next topic |
Author |
Message |
joefish Guru
Joined: 27 Jan 2004 Posts: 316 Location: New Zealand
|
Posted: Thu Feb 24, 2005 3:25 am Post subject: [SOLVED] Can't start Bind |
|
|
Bind *should* be starting when I boot, rc-status says it is running:
Code: | # rc-status
Runlevel: default
...
named [ started ]
...
|
'ps -ae' shows no 'named' running however.
The last message from dmesg says "process `named' is using obsolete setsockopt SO_BSDCOMPAT"
and /var/log/everything/current says:
Code: | Feb 24 16:15:03 [named] starting BIND 9.2.2-P1 -u named -n 1
Feb 24 16:15:03 [named] using 1 CPU
Feb 24 16:15:03 [named] loading configuration from '/etc/bind/named.conf'
Feb 24 16:15:03 [named] no IPv6 interfaces found
Feb 24 16:15:03 [named] listening on IPv4 interface lo, 127.0.0.1#53
Feb 24 16:15:03 [kernel] process `named' is using obsolete setsockopt SO_BSDCOMPAT
Feb 24 16:15:03 [named] listening on IPv4 interface eth0, 192.168.2.254#53
Feb 24 16:15:03 [named] listening on IPv4 interface eth1, 192.168.0.2#53
Feb 24 16:15:03 [named] listening on IPv4 interface eth2, 192.168.1.254#53
Feb 24 16:15:03 [named] command channel listening on 127.0.0.1#953
Feb 24 16:15:03 [named] couldn't open pid file '/var/run/named.pid': Permission denied
Feb 24 16:15:03 [named] exiting (due to early fatal error) |
I can't start/restart it: Code: | # /etc/init.d/named restart
* Stopping named... [ !! ]
* WARNING: "named" has already been started. |
Last edited by joefish on Thu Feb 24, 2005 11:24 am; edited 1 time in total |
|
Back to top |
|
|
wuzzerd Guru
Joined: 05 Jan 2005 Posts: 467 Location: New Mexico
|
Posted: Thu Feb 24, 2005 3:44 am Post subject: |
|
|
Who owns /var/run/named ?? It should be named.
Code: |
# dir /var/run
...
drwxr-xr-x 2 named named 4096 Feb 23 20:40 named
...
|
|
|
Back to top |
|
|
joefish Guru
Joined: 27 Jan 2004 Posts: 316 Location: New Zealand
|
Posted: Thu Feb 24, 2005 3:50 am Post subject: |
|
|
there was no such directory /var/run/named
I created it, and set the owner/group to named, but that does not solve my problem. |
|
Back to top |
|
|
wuzzerd Guru
Joined: 05 Jan 2005 Posts: 467 Location: New Mexico
|
Posted: Thu Feb 24, 2005 4:03 am Post subject: |
|
|
Hmm, what do your configuration files in /etc/bind and /etc/conf.d look like? |
|
Back to top |
|
|
joefish Guru
Joined: 27 Jan 2004 Posts: 316 Location: New Zealand
|
Posted: Thu Feb 24, 2005 4:10 am Post subject: |
|
|
/etc/conf.d/named: Code: | # Set various named options here.
#
OPTIONS=""
# Set this to the number of processors you have.
#
CPU="1"
# If you wish to run bind in a chroot, run:
# ebuild /var/db/pkg/net-dns/<bind version>/<bind-version> config
# and un-comment the following line.
# You can specify a different chroot directory but MAKE SURE it's empty.
# CHROOT="/chroot/dns" |
/etc/bind/named.conf Code: | // This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
options {
directory "/var/cache/bind";
version "surely you must be joking";
allow-recursion { 192.168.1.0/24; localhost; };
auth-nxdomain no; # conform to RFC1035
};
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
// add entries for other zones below here
zone "taurima.tla" {
type master;
file "/etc/bind/db.taurima.tla";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.1";
}; |
The /etc/bind/named.conf is just copied from my previous debian server. I haven't got as far as testing whether it works or not yet. |
|
Back to top |
|
|
wuzzerd Guru
Joined: 05 Jan 2005 Posts: 467 Location: New Mexico
|
Posted: Thu Feb 24, 2005 4:25 am Post subject: |
|
|
Ok, your Debian shows:
Quote: | options {
directory "/var/cache/bind";
|
My Gentoo shows
Quote: | ]options {
directory "/var/bind";
|
That looks like a good place to start. |
|
Back to top |
|
|
joefish Guru
Joined: 27 Jan 2004 Posts: 316 Location: New Zealand
|
Posted: Thu Feb 24, 2005 4:35 am Post subject: |
|
|
Well spotted, but still not the source of the problem. |
|
Back to top |
|
|
wuzzerd Guru
Joined: 05 Jan 2005 Posts: 467 Location: New Mexico
|
Posted: Thu Feb 24, 2005 4:42 am Post subject: |
|
|
I'm trying to think what I did. I think it ran out of the box. You did all the etc-update rc-update stuff? |
|
Back to top |
|
|
joefish Guru
Joined: 27 Jan 2004 Posts: 316 Location: New Zealand
|
Posted: Thu Feb 24, 2005 4:45 am Post subject: |
|
|
Yep. |
|
Back to top |
|
|
wuzzerd Guru
Joined: 05 Jan 2005 Posts: 467 Location: New Mexico
|
Posted: Thu Feb 24, 2005 4:51 am Post subject: |
|
|
Is named listed in your group file? |
|
Back to top |
|
|
j-m Retired Dev
Joined: 31 Oct 2004 Posts: 975
|
Posted: Thu Feb 24, 2005 8:56 am Post subject: |
|
|
Code: |
mkdir /var/run/named
chown named:named /var/run/named
|
and then set the following in named.conf
Code: |
pid-file "/var/run/named/named.pid";
|
(Re)start Bind. |
|
Back to top |
|
|
joefish Guru
Joined: 27 Jan 2004 Posts: 316 Location: New Zealand
|
Posted: Thu Feb 24, 2005 9:26 am Post subject: |
|
|
When adding the pid-file option to my named.conf, my logs show:
Code: | Feb 24 22:24:13 [named] /etc/bind/named.conf:58: unknown option 'pid-file' |
There is a line in /etc/group that says 'named:x:40:named' |
|
Back to top |
|
|
j-m Retired Dev
Joined: 31 Oct 2004 Posts: 975
|
Posted: Thu Feb 24, 2005 11:00 am Post subject: |
|
|
Eh, you need to place it in the proper place...
Code: |
options {
directory "/var/bind";
// uncomment the following lines to turn on DNS forwarding,
// and change the forwarding ip address(es) :
//forward first;
//forwarders {
// 123.123.123.123;
// 123.123.123.123;
//};
listen-on-v6 { none; };
listen-on { 127.0.0.1; };
// to allow only specific hosts to use the DNS server:
//allow-query {
// 127.0.0.1;
//};
// if you have problems and are behind a firewall:
//query-source address * port 53;
pid-file "/var/run/named/named.pid";
};
|
|
|
Back to top |
|
|
joefish Guru
Joined: 27 Jan 2004 Posts: 316 Location: New Zealand
|
Posted: Thu Feb 24, 2005 11:25 am Post subject: |
|
|
Thankyou! Now I can sleep...!
I'm also quite happy that I did not have to modify any of the rest of my bind configs - it's working well Before today I have never touched bind. |
|
Back to top |
|
|
|