From owner-freebsd-questions@FreeBSD.ORG Sun Nov 9 12:14:49 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A30316A4CE for ; Sun, 9 Nov 2003 12:14:49 -0800 (PST) Received: from deimos.frii.net (deimos.frii.net [216.17.128.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75FAF43FE0 for ; Sun, 9 Nov 2003 12:14:48 -0800 (PST) (envelope-from aaron@justaaron.com) Received: from justaaron.com (dsc01-ari-co-204-32-204-64.rasserver.net [204.32.204.64]) by deimos.frii.net (8.12.10/8.12.10) with ESMTP id hA9KEcBa001536 for ; Sun, 9 Nov 2003 13:14:41 -0700 (MST) Message-ID: <3FAEA027.4050001@justaaron.com> Date: Sun, 09 Nov 2003 13:14:31 -0700 From: Aaron User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031029 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Can't /.../rc.d/slapd.sh start X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: aaron@justaaron.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2003 20:14:49 -0000 I'm at my wit's end. It was a short trip. I can start slapd directly, but not from the startup script slapd.sh and therefore not automatically at boot. Starting slapd directly works fine, and I can access the database: [root@haiku aaron]# ll /usr/local/libexec/slapd -rwxr-xr-x 1 root wheel 633748 Nov 1 11:00 /usr/local/libexec/slapd* Here's my startup script, installed from the port: [root@haiku aaron]# ll /usr/local/etc/rc.d/slapd.sh -r-xr-xr-x 1 root wheel 2472 Nov 1 11:00 usr/local/etc/rc.d/slapd.sh Here's what I get when I try to start it: [root@haiku aaron]# /usr/local/etc/rc.d/slapd.sh start Starting slapd. However, slapd doesn't show up in "$ sockstat -4" Here's what I get when I turn on shell debugging: [root@haiku aaron]# sh -x /usr/local/etc/rc.d/slapd.sh start ... lots and lots of shell execution messages, including this: + checkyesno slapd_enable + eval _value=$slapd_enable + _value=YES + debug checkyesno: slapd_enable is set to YES. + return 0 + eval rc_pid=$(check_pidfile /var/run/openldap/slapd.pid /usr/local/libexec/slapd ) + check_pidfile /var/run/openldap/slapd.pid /usr/local/libexec/slapd + _pidfile=/var/run/openldap/slapd.pid + _procname=/usr/local/libexec/slapd + _interpreter= + [ -z /var/run/openldap/slapd.pid -o -z /usr/local/libexec/slapd ] + [ ! -f /var/run/openldap/slapd.pid ] + debug pid file {/var/run/openldap/slapd.pid): not readable. + return ... Note the 2nd to last line that ends in "slapd.pid): not readable. (Which, ironically, includes an emoticon frownie-face.) [root@haiku aaron]# ll /var/run/openldap/slapd.pid ls: /var/run/openldap/slapd.pid: No such file or directory Here's the relevant lines from /usr/local/etc/openldap/slapd.conf pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args OK, so I'll create those files: [root@haiku run]# cd /var/run/openldap/ [root@haiku openldap]# touch slapd.pid slapd.args [root@haiku openldap]# ll total 4 drwxr-xr-x 2 ldap ldap 512 Nov 9 12:34 ./ drwxr-xr-x 6 root wheel 512 Nov 9 12:06 ../ -rw-r--r-- 1 root ldap 0 Nov 9 12:34 slapd.args -rw-r--r-- 1 root ldap 0 Nov 9 12:34 slapd.pid They are owner/group root:ldap, izzat OK or should it be ldap:ldap? We'll change it a little later. Anyway, now that I've touched the pid file, let's start again: Well, here's progress, or change at least: [root@haiku openldap]# sh -x /usr/local/etc/rc.d/slapd.sh start ... + checkyesno slapd_enable + eval _value=$slapd_enable + _value=YES + debug checkyesno: slapd_enable is set to YES. + return 0 + eval rc_pid=$(check_pidfile /var/run/openldap/slapd.pid /usr/local/libexec/slapd ) + check_pidfile /var/run/openldap/slapd.pid /usr/local/libexec/slapd + _pidfile=/var/run/openldap/slapd.pid + _procname=/usr/local/libexec/slapd + _interpreter= + [ -z /var/run/openldap/slapd.pid -o -z /usr/local/libexec/slapd ] + [ ! -f /var/run/openldap/slapd.pid ] + read _pid _junk + [ -z ] + debug pid file {/var/run/openldap/slapd.pid): no pid in file. + return ... Note that now there's "no pid in file," and a couple lines up from that it says "read _pid _junk." At this point I tried chown ldap:ldap slapd.pid, but got exactly the same results, junk pid. Here's my system and port information: [root@haiku aaron]# uname -a FreeBSD haiku.krelm.com 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #1: Sat Sep 20 02:41:27 MDT 2003 aaron@haiku.krelm.com:/usr/src/sys/compile/HAIKU i386 [root@haiku openldap]# portversion -v |grep ldap openldap-client-2.1.22 = up-to-date with port openldap-server-2.1.22_2 = up-to-date with port Open to suggestions. -- Aaron aaron@justaaron.com