On Thu, May 1, 2008 at 7:39 PM, Ralf S. Engelschall <[EMAIL PROTECTED]> wrote:
>
> On Thu, May 01, 2008, Alain Spineux wrote:
>
>  > # openpkg rc bind stop
>  >
>  > dont work.
>  >
>  > running the command in a terminal show :
>  >
>  > # /kolab/sbin/rndc stop
>  > socket.c:3432: 2/No such file or directory
>  > rndc: connect: unexpected error
>  >
>  > in the file /kolab/etc/bind/rndc.conf ----
>  >
>  > ##
>  > ##  /kolab/etc/bind/rndc.conf -- BIND rndc configuration
>  > ##
>  >
>  > options {
>  >     default-server localhost-unix;
>  > };
>  >
>  > server localhost-unix {
>  >     addresses { "/kolab/var/bind/named.ctl"; };
>  >     key "rndc-key";
>  > };
>  >
>  > server localhost-inet {
>  >     addresses { 127.0.0.1; };
>  >     port 953;
>  >     key "rndc-key";
>  > };
>  >
>  > include "/kolab/etc/bind/rndc.key";
>  >
>  > ----------------------------
>  >
>  > You set the default to the unix socket, but looking in named.conf,
>  > only the inet is defined.
>  >
>  > Then changing the default to inet, like this
>  >
>  > options {
>  >     default-server localhost-int;
>  > };
>  >
>  > make thinks works better.
>
>  Well, we intentionally use "localhost-unix" here as this way the rndc
>  can more easily timeout on connects in case BIND is not running at all.

I made a mistake, I reused the same configuration file from long time now
and missed some changes in bind package :-)

Anyway after reseting named.conf  I get one error at startup (line
starting with >>)

# /kolab/sbin/named -u kolab-r -g
01-May-2008 23:47:03.739 starting BIND 9.4.2 -u kolab-r -g
01-May-2008 23:47:03.743 loading configuration from '/kolab/etc/bind/named.conf'
01-May-2008 23:47:03.745 listening on IPv4 interface lo, 127.0.0.1#53
01-May-2008 23:47:03.752 automatic empty zone: 127.IN-ADDR.ARPA
01-May-2008 23:47:03.753 automatic empty zone: 254.169.IN-ADDR.ARPA
01-May-2008 23:47:03.753 automatic empty zone: 2.0.192.IN-ADDR.ARPA
01-May-2008 23:47:03.753 automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
01-May-2008 23:47:03.753 automatic empty zone:
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
01-May-2008 23:47:03.754 automatic empty zone: D.F.IP6.ARPA
01-May-2008 23:47:03.754 automatic empty zone: 8.E.F.IP6.ARPA
01-May-2008 23:47:03.754 automatic empty zone: 9.E.F.IP6.ARPA
01-May-2008 23:47:03.754 automatic empty zone: A.E.F.IP6.ARPA
01-May-2008 23:47:03.755 automatic empty zone: B.E.F.IP6.ARPA
>> 01-May-2008 23:47:03.759 /kolab/etc/bind/named.conf:6: couldn't add
command channel /kolab/var/bind/named.ctl: permission denied
01-May-2008 23:47:03.760 ignoring config file logging statement due to -g option
01-May-2008 23:47:03.762 zone 0.0.127.in-addr.arpa/IN: NS
'0.0.127.in-addr.arpa' has no address records (A or AAAA)
01-May-2008 23:47:03.762 zone 0.0.127.in-addr.arpa/IN: loaded serial 2001010101
01-May-2008 23:47:03.763 zone
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN:
NS '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa'
has no address records (A or AAAA)
01-May-2008 23:47:03.763 zone
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN:
loaded serial 2001010101
01-May-2008 23:47:03.764 zone localhost/IN: loaded serial 2001010101
01-May-2008 23:47:03.765 running
01-May-2008 23:47:14.662 shutting down
01-May-2008 23:47:14.663 no longer listening on 127.0.0.1#53
01-May-2008 23:47:14.667 exiting

# ls -la /kolab/var/bind/
total 9220
drwxr-xr-x  2 kolab-r kolab-r    4096 May  2 00:00 .
drwxr-xr-x 23 kolab   kolab      4096 Apr  3 10:56 ..
-rw-r--r--  1 kolab-r kolab-r       0 May  2 00:00 named.log
-rw-r--r--  1 kolab-r kolab-r 9396239 May  1 23:46 named.log.0

using strace I get :

socket(PF_FILE, SOCK_STREAM, 0)         = 5
stat64("/kolab/var/bind/named.ctl", 0xbfcf281c) = -1 ENOENT (No such
file or directory)
close(5)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 5
fcntl64(5, F_DUPFD, 20)                 = 24
close(5)                                = 0
fcntl64(24, F_GETFL)                    = 0x2 (flags O_RDWR)
fcntl64(24, F_SETFL, O_RDWR|O_NONBLOCK) = 0
bind(24, {sa_family=AF_FILE, path="/kolab/var/bind/named.ctl"}, 110) =
-1 EACCES (Permission denied)
close(24)                               = 0
gettimeofday({1209678840, 917940}, NULL) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2944, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2944, ...}) = 0
write(2, "01-May-2008 23:54:00.917 /kolab/"..., 12901-May-2008
23:54:00.917 /kolab/etc/bind/named.conf:6: couldn't add command
channel /kolab/var/bind/named.ctl: permi
ssion denied
) = 129

after a chmod a+w /kolab/var/bind/,
I still get an error

02-May-2008 00:07:59.248 automatic empty zone: B.E.F.IP6.ARPA
02-May-2008 00:07:59.250 isc_socket_permunix:
chown(/kolab/var/bind/named.ctl, 19415, 19415): Operation not
permitted
02-May-2008 00:07:59.250 /kolab/etc/bind/named.conf:6: couldn't add
command channel /kolab/var/bind/named.ctl: failure
02-May-2008 00:07:59.250 ignoring config file logging statement due to -g option

strace give

bind(24, {sa_family=AF_FILE, path="/kolab/var/bind/named.ctl"}, 110) = 0
chmod("/kolab/var/bind/named.ctl", 0600) = 0
chown32("/kolab/var/bind/named.ctl", 19415, 19415) = -1 EPERM
(Operation not permitted)

# ls -la /kolab/var/bind/
total 9232
drwxrwxrwx  2 kolab-r kolab-r    4096 May  2 00:07 .
drwxr-xr-x 23 kolab   kolab      4096 Apr  3 10:56 ..
srw-------  1 root    root          0 May  2 00:07 named.ctl
-rw-r--r--  1 kolab-r kolab-r       0 May  2 00:00 named.log
-rw-r--r--  1 kolab-r kolab-r 9396239 May  1 23:46 named.log.0
-rw-r--r--  1 kolab-r kolab-r       6 May  2 00:07 named.pid

in named.conf, I have :

controls {
    unix "/kolab/var/bind/named.ctl"
         perm 0600 owner 19415 group 19415
         keys { "rndc-key"; };
    #inet 127.0.0.1 port 953
         #allow { 127.0.0.1;  }
         #keys  { "rndc-key"; };
};

Any idea what's wrong ?

Regards.


>
>  The question for me is just whether "localhost-unix" isn't working for
>  you. For me it is working just fine here under FreeBSD 6...
>
>                                        Ralf S. Engelschall
>                                        [EMAIL PROTECTED]
>                                        www.engelschall.com
>
>  ______________________________________________________________________
>  OpenPKG                                             http://openpkg.org
>  User Communication List                      openpkg-users@openpkg.org
>



-- 
Alain Spineux
aspineux gmail com
May the sources be with you
______________________________________________________________________
OpenPKG                                             http://openpkg.org
User Communication List                      openpkg-users@openpkg.org

Reply via email to