I am runing slapcat command like this, slapcat -f slapd.conf -l backup.ldif is it wrong ?
On Thu, Oct 30, 2014 at 10:20 PM, Quanah Gibson-Mount quanah@zimbra.com wrote:
--On Thursday, October 30, 2014 11:16 PM +0100 pramod kulkarni < pammu.kulkarni@gmail.com> wrote:
5452a973 The first database does not allow slapcat; using the first
available on e (2)
You're running slapcat incorrectly if you get this message.
In any case, as already noted, the correct solution is to move to using back-mdb, and stop using the deprecated BDB based backend.
--Quanah
--
Quanah Gibson-Mount Server Architect Zimbra, Inc.
Zimbra :: the leader in open source messaging and collaboration
pramod kulkarni wrote:
I am runing slapcat command like this, slapcat -f slapd.conf -l backup.ldif is it wrong ?
If you have more than one database you have to use either one of command line options -n or -b.
Ciao, Michael.
If I specify slapcat -f slapd.conf -b "dc=example,dc=com" -l backup.ldif Then no messages will be displayed in the command window and it will be in the same state.
I see somewhere code hangs in the alock.c file I think the slapcat process not able to grab the lock,is it correct? or something different.
Regards, Pramod
On Thu, Oct 30, 2014 at 10:37 PM, Michael Ströder michael@stroeder.com wrote:
pramod kulkarni wrote:
I am runing slapcat command like this, slapcat -f slapd.conf -l
backup.ldif
is it wrong ?
If you have more than one database you have to use either one of command line options -n or -b.
Ciao, Michael.
Hi!
I'm also using BDB, but I don't have sich problems (SLES11 SP3). You can get the PID of your slapd with (assuming Linux) # ps ax |grep slapd 3844 ? Ssl 3:53 /usr/lib/openldap/slapd -h ldap://... Then you can check for locks with # grep " 3844 " /proc/locks 6: POSIX ADVISORY WRITE 3844 fd:06:90781 1024 2047 7: POSIX ADVISORY WRITE 3844 fd:06:74093 1024 2047 Then you can check which files are locked # lsof -p 3844 |egrep ' 90781 | 74093 ' slapd 3844 ldap 10uw REG 253,6 4096 74093 /var/lib/ldap/alock slapd 3844 ldap 13uw REG 253,6 4096 90781 /var/lib/ldap/audit/alock You can check for any process that uses an "alock": # lsof |grep /alock slapd 3844 ldap 10uw REG 253,6 4096 74093 /var/lib/ldap/alock slapd 3844 ldap 13uw REG 253,6 4096 90781 /var/lib/ldap/audit/alock
Maybe you can find out what's wong. My slapd is using BDB 4.5 it seems: # ldd /usr/lib/openldap/slapd linux-vdso.so.1 => (0x00007fff4a5ff000) libldap_r-2.4.so.2 => /usr/lib64/libldap_r-2.4.so.2 (0x00007f365844a000) liblber-2.4.so.2 => /usr/lib64/liblber-2.4.so.2 (0x00007f365823a000) libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007f3658030000) libdb-4.5.so => /usr/lib64/libdb-4.5.so (0x00007f3657cf8000) libslp.so.1 => /usr/lib64/libslp.so.1 (0x00007f3657adf000) libm.so.6 => /lib64/libm.so.6 (0x00007f3657865000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f365764d000) libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007f3657432000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f365722d000) libssl.so.0.9.8 => /usr/lib64/libssl.so.0.9.8 (0x00007f3656fd7000) libcrypto.so.0.9.8 => /usr/lib64/libcrypto.so.0.9.8 (0x00007f3656c38000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f36569fc000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f36567e5000) libwrap.so.0 => /lib64/libwrap.so.0 (0x00007f36565da000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f36563bc000) libc.so.6 => /lib64/libc.so.6 (0x00007f3656043000) /lib64/ld-linux-x86-64.so.2 (0x00007f3658958000) libz.so.1 => /lib64/libz.so.1 (0x00007f3655e2c000)
Regards, Ulrich
pramod kulkarni pammu.kulkarni@gmail.com schrieb am 30.10.2014 um 22:49
in Nachricht CANyT8DkYEh_AQ5cgBKkfm2A_8LBUnmu8opXU2fC3GgPUX7Wx=Q@mail.gmail.com:
If I specify slapcat -f slapd.conf -b "dc=example,dc=com" -l backup.ldif Then no messages will be displayed in the command window and it will be in the same state.
I see somewhere code hangs in the alock.c file I think the slapcat process not able to grab the lock,is it correct? or something different.
Regards, Pramod
On Thu, Oct 30, 2014 at 10:37 PM, Michael Ströder michael@stroeder.com wrote:
pramod kulkarni wrote:
I am runing slapcat command like this, slapcat -f slapd.conf -l
backup.ldif
is it wrong ?
If you have more than one database you have to use either one of command line options -n or -b.
Ciao, Michael.
Am Thu, 30 Oct 2014 22:49:45 +0100 schrieb pramod kulkarni pammu.kulkarni@gmail.com:
If I specify slapcat -f slapd.conf -b "dc=example,dc=com" -l backup.ldif Then no messages will be displayed in the command window and it will be in the same state.
I see somewhere code hangs in the alock.c file I think the slapcat process not able to grab the lock,is it correct? or something different.
[...]
Who should be the owner of the directory? Did you start slapd as root? It seems, that the initial alock file has been created by root but the process is ownded by a different user, probably ldap or openldap.
-Dieter
I see somewhere code hangs in the alock.c file I think the slapcat process not able to grab the lock,is it correct? or something different.
Ciao.
The same issue seems to occur under Windows. I reckon I may have reported it some time ago.
... ... 52879a45 bdb_db_open: "dc=example,dc=com" 52879a45 bdb_db_open: database "dc=example,dc=com": unclean shutdown detected; attempting recovery. 52879a45 bdb_db_open: warning - no DB_CONFIG file found in directory ../testrun/db.1.a: (2). Expect poor performance for suffix "dc=example,dc=com". 52879a45 bdb_db_open: database "dc=example,dc=com": dbenv_open(../testrun/db.1.a). 52879a46 bdb_db_open: database "dc=example,dc=com": alock_recover failed 52879a46 ====> bdb_cache_release_all 52879a46 bdb_db_close: database "dc=example,dc=com": alock_close failed 52879a46 backend_startup_one (type=bdb, suffix="dc=example,dc=com"): bi_db_open failed! (-1) 52879a46 slapd shutdown: initiated 52879a46 ====> bdb_cache_release_all 52879a46 bdb_db_close: database "dc=example,dc=com": alock_close failed 52879a46 slapd destroy: freeing system resources. 52879a46 slapd stopped. ... ...
Thanks for the information. What is the fix on windows ?
On Fri, Oct 31, 2014 at 1:44 PM, Sergio NNX sfhacker@hotmail.com wrote:
I see somewhere code hangs in the alock.c file I think the slapcat process not able to grab the lock,is it correct? or something different.
Ciao.
The same issue seems to occur under Windows. I reckon I may have reported it some time ago.
... ... 52879a45 bdb_db_open: "dc=example,dc=com" 52879a45 bdb_db_open: database "dc=example,dc=com": unclean shutdown detected; attempting recovery. 52879a45 bdb_db_open: warning - no DB_CONFIG file found in directory ../testrun/db.1.a: (2). Expect poor performance for suffix "dc=example,dc=com". 52879a45 bdb_db_open: database "dc=example,dc=com": dbenv_open(../testrun/db.1.a). 52879a46 bdb_db_open: database "dc=example,dc=com": alock_recover failed 52879a46 ====> bdb_cache_release_all 52879a46 bdb_db_close: database "dc=example,dc=com": alock_close failed 52879a46 backend_startup_one (type=bdb, suffix="dc=example,dc=com"): bi_db_open failed! (-1) 52879a46 slapd shutdown: initiated 52879a46 ====> bdb_cache_release_all 52879a46 bdb_db_close: database "dc=example,dc=com": alock_close failed 52879a46 slapd destroy: freeing system resources. 52879a46 slapd stopped. ... ...
Sergio NNX wrote:
I see somewhere code hangs in the alock.c file I think the slapcat process not able to grab the lock,is it correct? or something different.
Ciao.
The same issue seems to occur under Windows. I reckon I may have reported it some time ago.
Windows locking was fixed in ITS#7361, in 2.4.33, 2 years ago.
... ... 52879a45 bdb_db_open: "dc=example,dc=com" 52879a45 bdb_db_open: database "dc=example,dc=com": unclean shutdown detected; attempting recovery. 52879a45 bdb_db_open: warning - no DB_CONFIG file found in directory ../testrun/db.1.a: (2). Expect poor performance for suffix "dc=example,dc=com". 52879a45 bdb_db_open: database "dc=example,dc=com": dbenv_open(../testrun/db.1.a). 52879a46 bdb_db_open: database "dc=example,dc=com": alock_recover failed 52879a46 ====> bdb_cache_release_all 52879a46 bdb_db_close: database "dc=example,dc=com": alock_close failed 52879a46 backend_startup_one (type=bdb, suffix="dc=example,dc=com"): bi_db_open failed! (-1) 52879a46 slapd shutdown: initiated 52879a46 ====> bdb_cache_release_all 52879a46 bdb_db_close: database "dc=example,dc=com": alock_close failed 52879a46 slapd destroy: freeing system resources. 52879a46 slapd stopped. ... ...
Thanks for the information. I am able get rid of the slapcat hanging by your suggestion but not fully I guess whenever I restart the system I get the below error,again alock trouble
5454b6be bdb_db_open: database "dc=example,dc=com": alock_recover failed 5454b6be ====> bdb_cache_release_all
Regards, Pramod
On Fri, Oct 31, 2014 at 2:13 PM, Howard Chu hyc@symas.com wrote:
Sergio NNX wrote:
I see somewhere code hangs in the alock.c file I think the slapcat process not able to grab the lock,is it correct? or something different.
Ciao.
The same issue seems to occur under Windows. I reckon I may have reported it some time ago.
Windows locking was fixed in ITS#7361, in 2.4.33, 2 years ago.
... ... 52879a45 bdb_db_open: "dc=example,dc=com" 52879a45 bdb_db_open: database "dc=example,dc=com": unclean shutdown detected; attempting recovery. 52879a45 bdb_db_open: warning - no DB_CONFIG file found in directory ../testrun/db.1.a: (2). Expect poor performance for suffix "dc=example,dc=com". 52879a45 bdb_db_open: database "dc=example,dc=com": dbenv_open(../testrun/db.1.a). 52879a46 bdb_db_open: database "dc=example,dc=com": alock_recover failed 52879a46 ====> bdb_cache_release_all 52879a46 bdb_db_close: database "dc=example,dc=com": alock_close failed 52879a46 backend_startup_one (type=bdb, suffix="dc=example,dc=com"): bi_db_open failed! (-1) 52879a46 slapd shutdown: initiated 52879a46 ====> bdb_cache_release_all 52879a46 bdb_db_close: database "dc=example,dc=com": alock_close failed 52879a46 slapd destroy: freeing system resources. 52879a46 slapd stopped. ... ...
-- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
openldap-technical@openldap.org