After updating from openldap version 2.0.27 to the current stable one. ldapsearch won't find anything. Reproducible: Always Steps to Reproduce: 1. update from openldap 2.0.27 to 2.1.26 2. run "ldapsearch -x" Actual Results: # ldapsearch -x # extended LDIF # # LDAPv3 # base <> with scope sub # filter: (objectclass=*) # requesting: ALL # # search result search: 2 result: 32 No such object # numResponses: 1 Expected Results: should print ldif output from the database # emerge info Portage 2.0.50 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.1-mm5) ================================================================= System uname: 2.6.1-mm5 i686 Pentium III (Katmai) Gentoo Base System version 1.4.3.13 Autoconf: sys-devel/autoconf-2.58 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /opt/jakarta/tomcat/conf /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://ftp.gentoo.skynet.be/pub/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://www.fhh.opensource-mirror.de/gentoo.org/ ftp://ftp.fhh.opensource-mirror.de/pub/gentoo.org/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl acpi acpi4linux alsa apache2 apm arts avi berkdb crypt cups encode esd foomaticdb gdbm gif gpm gtk gtk2 imap imlib ipv6 java jpeg ldap libg++ libwww mad maildir mikmod mmx motif mpeg mysql ncurses nls nptl oggvorbis opengl oss pam pdflib perl pic png python qt quicktime readline samba sasl sdl sis slang snmp spell sse ssl svga tcltk tcpd truetype unicode v4l vim-with-x x86 xml xml2 xmms xv zlib"
slapcat DOES function. So now I don't have any glue why slapcat prints my database entries and ldapsearch and every other ldap-tool (ex. gq) not...
check the file permissions on the data files. it's highly likely they are wrong.
I don't think that in this case permissions are the problem. Since the user is same as before and I didn't change any permissions after updateing... # ps -ef|grep ldap ldap 10435 1 0 02:24 ? 00:00:00 /usr/lib/openldap/slapd -u ldap -g ldap # ls -al /var/state/openldap-ldbm insgesamt 73 drwx------ 2 ldap ldap 144 15. Nov 2002 . drwxr-xr-x 3 root root 144 9. Feb 09:13 .. -rw------- 1 ldap ldap 24576 10. Feb 02:20 dn2id.dbb -rw------- 1 ldap ldap 40960 9. Feb 21:20 id2entry.dbb -rw------- 1 ldap ldap 8192 9. Feb 21:20 nextid.dbb
please fire up slapd manually with lots of debugging and try to see what operation is failing, and the report back here.
Created attachment 25465 [details] Errorlog for "ldapsearch -x" During initialization of slapd there appear no error messages, so I start the log after the successful initialization. Of cause there you will find a lot of errors hope you can make something out of it... I started "slapd -u ldap -g ldap -d 4085" for the output....
It seems openldap 2.1 cannot work with the old index of 2.0. Why, I don't really know. But it seems that it is aware of the whole structure of the tree. This is why slapcat works and ldapsearch won't. Something concerning indexes got messed up from version 2.0.x to 2.1.x. Any fix other than: 1.) downgrade to 2.0.27 2.) export to ldif 3.) update again to 2.1.27 4.) delete old files of db-directory 5.) start slapd 6.) reimport ldif
Another way to build new indexes is executing "slapindex". It works for me.
ok, i've added in more details to the postinst message on the ebuild now, including the note about slapindex.