[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Openldap 2.3.11 cannot autorecover from abnormal shutdown.



Quanah Gibson-Mount wrote:


 --On Tuesday, December 20, 2005 11:20 AM +0800 Yingbo Qiu
 <qiuyingbo@gmail.com> wrote:

> But in some abnormal cases, such as power failure. slapd cannot
> autorecover at startup. It report:
>> ...... slapd startup: initiated. backend_startup_one: starting
>> "cn=config" backend_startup_one: starting "o=eyou.com"
>> bdb_db_open: o=eyou.com
>>> bdb_db_open: unclean shutdown detected; attempting recovery.
>>> bdb_db_open: dbenv_open(/var/eyou/openldap/var/openldap-data)
>>> bdb(o=eyou.com): Program version 4.3 doesn't match environment version
>> bdb_db_open: Recovery needed but environment is missing -
>> assuming recovery was done manually...
>> bdb(o=eyou.com): Program version 4.3 doesn't match environment
>> version bdb_db_open: dbenv_open failed: DB_VERSION_MISMATCH:
>> Database environment version mismatch (-30974)
>> backend_startup_one: bi_db_open failed! (-30974) slapd shutdown:
>> initiated slapd destroy: freeing system resources. slapd stopped.
>>  connections_destroy: nothing to destroy.

You may with to upgrade to 2.3.13, where there were fixes to autorecovery since 2.3.11.

Those fixes would not address this problem. The fact that the BDB library is complaining about a version mismatch means the system is improperly configured.

Much as I agree that upgrading to the most recent source is a good idea, it is *not* a good idea to blindly encourage people to upgrade when there is no basis for believing it will in any way address the problem. Get a real diagnosis first; never suggest a course of action before you understand the actual problem.

It's clear from the log that this particular slapd binary is linked with a BDB 4.3 library. The problem seems to be that a BDB tool from a different version was used to access the database at some point. This implies that the operating system is misconfigured; either the PATH or the LD_LIBRARY_PATH are pointing to the wrong place, or some other similar mistake. No amount of OpenLDAP software patching can correct such a sysadmin mistake.

--
 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sun        http://highlandsun.com/hyc
 OpenLDAP Core Team            http://www.openldap.org/project/