Hi team,
My LDAP service had an unexpected blackout, it can’t be started. could you pls advise how I can restart it?
When I check the slapd status:
[root@nplserver1 ~]# service slapd status
slapd dead but pid file exists àbut I can’t find any pid file
When I start slapd, below will be come.
[root@nplserver1 openldap]# slapd start -d 256
@(#) $OpenLDAP: slapd 2.4.23 (Feb 22 2013 01:50:21) $
mockbuild@c6b7.bsys.dev.centos.org:/builddir/build/BUILD/openldap-2.4.23/openldap-2.4.23/build-servers/servers/slapd
bdb(dc=npl,dc=tmsr): unable to join the environment
bdb_db_open: database "dc=npl,dc=tmsr" cannot be opened, err 11. Restore from backup!
bdb(dc=npl,dc=tmsr): txn_checkpoint interface requires an environment configured for the transaction subsystem
bdb_db_close: database "dc=npl,dc=tmsr": txn_checkpoint failed: Invalid argument (22).
backend_startup_one (type=bdb, suffix="dc=npl,dc=tmsr"): bi_db_open failed! (11)
bdb_db_close: database "dc=npl,dc=tmsr": alock_close failed
slapd stopped.
And I can’t find any process in 389 port.
best wishes
Eileen
On 06/24/14 16:19 +0800, Eileen(=^ω^=) wrote:
When I start slapd, below will be come.
[root@nplserver1 openldap]# slapd start -d 256
@(#) $OpenLDAP: slapd 2.4.23 (Feb 22 2013 01:50:21) $
mockbuild@c6b7.bsys.dev.centos.org:/builddir/build/BUILD/openldap-2.4.23/openldap-2.4.23/build-servers/servers/slapd
bdb(dc=npl,dc=tmsr): unable to join the environment
bdb_db_open: database "dc=npl,dc=tmsr" cannot be opened, err 11. Restore from backup!
bdb(dc=npl,dc=tmsr): txn_checkpoint interface requires an environment configured for the transaction subsystem
bdb_db_close: database "dc=npl,dc=tmsr": txn_checkpoint failed: Invalid argument (22).
backend_startup_one (type=bdb, suffix="dc=npl,dc=tmsr"): bi_db_open failed! (11)
bdb_db_close: database "dc=npl,dc=tmsr": alock_close failed
slapd stopped.
I'm not familiar with the specific error messages you're getting. There are error codes in your output produced by BerkeleyDB. Consult the documentation for that project for how to proceed in the safest manner.
Have you performed any upgrades? Do you have any permissions problems on your directory location? Check the location corresponding to your configured directory/olcDbDirectory.
On Tue, Jun 24, 2014 at 9:47 AM, Dan White dwhite@olp.net wrote:
On 06/24/14 16:19 +0800, Eileen(=^ω^=) wrote:
When I start slapd, below will be come.
[root@nplserver1 openldap]# slapd start -d 256
@(#) $OpenLDAP: slapd 2.4.23 (Feb 22 2013 01:50:21) $
mockbuild@c6b7.bsys.dev.centos.org:/builddir/build/BUILD/openldap-2.4.23/openldap-2.4.23/build-servers/servers/slapd
bdb(dc=npl,dc=tmsr): unable to join the environment
bdb_db_open: database "dc=npl,dc=tmsr" cannot be opened, err 11. Restore from backup!
bdb(dc=npl,dc=tmsr): txn_checkpoint interface requires an environment configured for the transaction subsystem
bdb_db_close: database "dc=npl,dc=tmsr": txn_checkpoint failed: Invalid argument (22).
backend_startup_one (type=bdb, suffix="dc=npl,dc=tmsr"): bi_db_open failed! (11)
bdb_db_close: database "dc=npl,dc=tmsr": alock_close failed
slapd stopped.
I'm not familiar with the specific error messages you're getting. There are error codes in your output produced by BerkeleyDB. Consult the documentation for that project for how to proceed in the safest manner.
Have you performed any upgrades? Do you have any permissions problems on your directory location? Check the location corresponding to your configured directory/olcDbDirectory.
I does sound like the database is corrupted somehow. slapcat needs slapd to be running, right?
-- Dan White
On 06/24/14 10:10 -0400, Mauricio Tavares wrote:
On Tue, Jun 24, 2014 at 9:47 AM, Dan White dwhite@olp.net wrote:
On 06/24/14 16:19 +0800, Eileen(=^ω^=) wrote:
bdb(dc=npl,dc=tmsr): unable to join the environment bdb_db_open: database "dc=npl,dc=tmsr" cannot be opened, err 11. Restore from backup! bdb(dc=npl,dc=tmsr): txn_checkpoint interface requires an environment configured for the transaction subsystem bdb_db_close: database "dc=npl,dc=tmsr": txn_checkpoint failed: Invalid argument (22). backend_startup_one (type=bdb, suffix="dc=npl,dc=tmsr"): bi_db_open failed! (11) bdb_db_close: database "dc=npl,dc=tmsr": alock_close failed slapd stopped.
I'm not familiar with the specific error messages you're getting. There are error codes in your output produced by BerkeleyDB. Consult the documentation for that project for how to proceed in the safest manner.
Have you performed any upgrades? Do you have any permissions problems on your directory location? Check the location corresponding to your configured directory/olcDbDirectory.
I does sound like the database is corrupted somehow. slapcat
needs slapd to be running, right?
slapcat does not need slapd to be running, but will probably hit similar errors.
Hi,
I does sound like the database is corrupted somehow. slapcat
needs slapd to be running, right?
No. slapcat is in fact an alias for slapd and thus contains all the logic needed to operate on the database.
It will, however, face the same issues.
Of course, you have a slapcat backup Form yesterday, so just remove the stuff and slapadd, right ;)?
-nik
Hi,
On 24/06/14 16:31, Dominik George wrote:
Of course, you have a slapcat backup Form yesterday, so just remove the stuff and slapadd, right ;)? -nik
(If you don't have a backup... ) ...depending on your operating system and OpenLDAP version installed, you should have on your system a tool called db<version>_recover
e.g.: db5.1_recover, db4.8_recover and so on.
(from the man page:) "db5.1_recover - Restore the database to a consistent state
The db5.1_recover utility must be run after an unexpected application, Berkeley DB, or system failure to restore the database to a consistent state. All committed transactions are guaranteed to appear after db5.1_recover has run, and all uncommitted transactions will be completely undone."
Be sure to make a backup copy of your db before running it, and that the version of the db utilities that you are running matches your BDB version (I haven't tried to recover it using different utilities/db version).
If you manage to restore your db, make sure you perform regular backups and that you have at least 1 slapd replica running.... they can both help you to restore the system in such situations :)
Kind Regards, Alessandro
hi Alessandro,
thank you for the reply. I have some questions in here, pls kindly bear me , i have not so much knowledge with ldap and BDB.
1. For command db5.1_recover . How to use this command, and what is the documentation can teach me how to use this db_recover. How can i know what is the BDB version i use in my LDAP servicer? 2. How to backup the db and make perform regular backups? this is important for me to avoid next blackout. 3. I sad to say i haven't any slapd replica , so i can't run the db_recover?
------------------ Original ------------------ From: "Alessandro Avagliano";alessandro@avagliano.berlin; Date: Tue, Jun 24, 2014 11:19 PM To: "openldap-technical"openldap-technical@openldap.org;
Subject: Re: slapd dead. pls advise how I can restart it
Hi,
On 24/06/14 16:31, Dominik George wrote:
Of course, you have a slapcat backup Form yesterday, so just remove the stuff and slapadd, right ;)? -nik
(If you don't have a backup... ) ...depending on your operating system and OpenLDAP version installed, you should have on your system a tool called db<version>_recover
e.g.: db5.1_recover, db4.8_recover and so on.
(from the man page:) "db5.1_recover - Restore the database to a consistent state
The db5.1_recover utility must be run after an unexpected application, Berkeley DB, or system failure to restore the database to a consistent state. All committed transactions are guaranteed to appear after db5.1_recover has run, and all uncommitted transactions will be completely undone."
Be sure to make a backup copy of your db before running it, and that the version of the db utilities that you are running matches your BDB version (I haven't tried to recover it using different utilities/db version).
If you manage to restore your db, make sure you perform regular backups and that you have at least 1 slapd replica running.... they can both help you to restore the system in such situations :)
Kind Regards, Alessandro
Check the ownership of your ldap dbase directory. I’ve seen the same errors as your described then after checking the ownership had changed to root:root instead of ldap:ldap.
From: openldap-technical-bounces@OpenLDAP.org [mailto:openldap-technical-bounces@OpenLDAP.org] On Behalf Of Eileen(=^?^=) Sent: Tuesday, June 24, 2014 9:05 PM To: Alessandro Avagliano; openldap-technical Subject: Re: slapd dead. pls advise how I can restart it
hi Alessandro,
thank you for the reply. I have some questions in here, pls kindly bear me , i have not so much knowledge with ldap and BDB.
1. For command db5.1_recover . How to use this command, and what is the documentation can teach me how to use this db_recover. How can i know what is the BDB version i use in my LDAP servicer?
2. How to backup the db and make perform regular backups? this is important for me to avoid next blackout.
3. I sad to say i haven't any slapd replica , so i can't run the db_recover?
------------------ Original ------------------
From: "Alessandro Avagliano";alessandro@avagliano.berlin;
Date: Tue, Jun 24, 2014 11:19 PM
To: "openldap-technical"openldap-technical@openldap.org;
Subject: Re: slapd dead. pls advise how I can restart it
Hi,
On 24/06/14 16:31, Dominik George wrote:
Of course, you have a slapcat backup Form yesterday, so just remove the stuff and slapadd, right ;)? -nik
(If you don't have a backup... ) ...depending on your operating system and OpenLDAP version installed, you should have on your system a tool called db<version>_recover
e.g.: db5.1_recover, db4.8_recover and so on.
(from the man page:) "db5.1_recover - Restore the database to a consistent state
The db5.1_recover utility must be run after an unexpected application, Berkeley DB, or system failure to restore the database to a consistent state. All committed transactions are guaranteed to appear after db5.1_recover has run, and all uncommitted transactions will be completely undone."
Be sure to make a backup copy of your db before running it, and that the version of the db utilities that you are running matches your BDB version (I haven't tried to recover it using different utilities/db version).
If you manage to restore your db, make sure you perform regular backups and that you have at least 1 slapd replica running.... they can both help you to restore the system in such situations :)
Kind Regards, Alessandro
--On Tuesday, June 24, 2014 5:19 PM +0800 "Eileen(=^ω^=)" 123784635@qq.com wrote:
backend_startup_one (type=bdb, suffix="dc=npl,dc=tmsr"): bi_db_open failed! (11)
bdb_db_close: database "dc=npl,dc=tmsr": alock_close failed
Looks like your BDB database may have been corrupted. It's also possible it is just a problem with the alock file. You can try removing the alock file and running the appropriate BDB db_recover command for the version of BDB your OpenLDAP is linked to.
--Quanah
--
Quanah Gibson-Mount Server Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
openldap-technical@openldap.org