Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21962 (slapd) - slapd cannot be stopped from within /etc/init.d/slapd
Summary: slapd cannot be stopped from within /etc/init.d/slapd
Status: RESOLVED CANTFIX
Alias: slapd
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-30 11:41 UTC by Torsten Flammiger
Modified: 2010-03-13 05:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Flammiger 2003-05-30 11:41:02 UTC
slapd cannot be stopped from within /etc/init.d/slapd. While starting slapd the
startscript will not create the pid file (/var/state/....)

Reproducible: Always
Steps to Reproduce:
1. start the slapd daemon: /etc/init.d/slapd start
2. try to stop it
3.

Actual Results:  
I put the option -m befor --pid-file=/some/path and now it works as it should
Comment 1 Torsten Flammiger 2003-05-30 11:44:12 UTC
Comment: this happens on Gentoo 1.2 and 1.4rc4 (both tested on x86)
Comment 2 Grant Goodyear (RETIRED) gentoo-dev 2003-06-11 05:50:44 UTC
What version of openldap?
Comment 3 Torsten Flammiger 2003-06-11 08:08:08 UTC
I have installed 2.0.25-r2
Comment 4 Grant Goodyear (RETIRED) gentoo-dev 2003-06-11 09:26:01 UTC
Right now the only versions of openldap that aren't broken (or, at least,
are _less_ broken) are 2.0.27-r4 and 2.1.20.  We're in the process of cleaning
up these ebuilds right now, but they haven't stabilized just yet, however.

Sorry about that.  My suggestion is to use 2.0.27-r4, and hopefully we'll get 
this stuff nailed down fairly soon.
Comment 5 Grant Goodyear (RETIRED) gentoo-dev 2003-07-26 10:08:49 UTC
Reassigning to raker, our current ldap maintainer.
Comment 6 Nick Hadaway 2003-07-26 11:33:52 UTC
I am working on backporting the changes implemented in 2.0.27-r4 to an updated 2.0.25-r3.  Things are testing right now.
Comment 7 Nick Hadaway 2003-07-26 12:05:15 UTC
The new build is now in portage.  This now sets so slapd is run as user:group ldap:ldap and the /var/state/* stuff has been moved to /var/lib/openldap-* ... Please test this ebuild and let me know if you find any problems.
If everything is good, you should be at a feature-match with current profile users.
Comment 8 Torsten Flammiger 2003-08-02 04:35:30 UTC
the ebuilds >= 2.0.25 seems not to be official allthough i set ACCECPT_KEYWORS="~x86" (weeks ago) ?? No ebuild >= 2.0.25-r3 is available for install. So i installed 2.0.27 by direct call. 2.1.x is masked.
The new init script is starting SLAPD with user/group:ldap but an existing ldap db is owned by root/root. After changing the permissions my samba authentification worked fine again. But stopping does allready not work:

1. an existing PID File under /var/run/openldap/ is owned by root
   it cannot be modified by ldap/ldap
2. after changing this issue no pid file is generated by the statup script since      
   the parameter -m befor --pidfile is still missing
3. stopping does allready not work: the PID File contains the wrong pid number:     
   the real processid is '`cat /var/run/openldap/slapd.pid` +1'

the last behavior[3] i saw a few months ago in another Gentoo Package. I cant remember ;(
Comment 9 Nick Hadaway 2004-06-07 20:53:32 UTC
The 2.1 series should be marked stable now and these issues have long been worked though.  If you are still having problems with the latest stable builds, please re-open this bug.
Comment 10 Boyd Waters 2010-03-13 05:17:58 UTC
I see that this bug is seven (!) years old, but I'm getting this bug once more with openldap-2.4.19-r1

And the work-around to include the '-m' argument to start-stop-daemon doesn't quite work anymore, as the pid that gets written to the pidfile is one less than the pid of the actual daemon. For instance /var/run/openldap/slapd.pid might contain 4189 but "ps -e | grep slapd" shows the daemon running at pid 4190. So the /etc/init.d/slapd --stop command does not stop the daemon, and it cannot be restarted without operator intervention.

Probably not a real problem if you start the daemon when you boot the system, and keep it running forever, but it's worth noting.

I wish I had some insight into a fix for you...


# emerge --info
Portage 2.2_rc67 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11-r1, 2.6.33-gentoo x86_64)
=================================================================
System uname: Linux-2.6.33-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 12 Mar 2010 07:30:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p2
dev-lang/python:     2.6.4-r1, 3.1.1-r1
dev-util/ccache:     2.4-r8
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -ggdb -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -ggdb -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo http://gentoo.mirrors.easynews.com/linux/gentoo/ http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ http://mirror.datapipe.net/gentoo http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.llarian.net/ "
LANG="C"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/opt/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo caps cdr cleartype cli consolekit cracklib crypt custom-optimization cxx dbus device-mapper dri dts dvd dvdr eds emboss encode evo extras fam fftw firefox flac fortran fuse gdbm gdu gif gmp gnome gnutls gpm gtk hal hardened howl-compat iconv ipv6 jpeg jpeg2k kdrive ldap libnotify mad mdnsresponder-compat mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses nls nptl nptlonly nvidia ogg opengl openmp openssl optimized-qmake pam pcre pdf perl pic pie png policykit ppds pppd python quicktime readline reflection ruby sasl sdl secure-delete session sip smp spell spl sqlite sqlite3 sse sse2 sse3 ssl startup-notification svg sysfs system-sqlite tcpd threads thunar tiff toolbar truetype unicode usb vorbis wav x264 xattr xcomposite xml xorg xv xvid yaz zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS