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

Openldap 2.3.11 cannot autorecover from abnormal shutdown.



If the slapd was killed by SIGKILL(9), bdb database will be
autorecovered at startup, I can read recovery message from 'slapd -d
5'

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.

If I run db_recover manually. The corruption could be recovered:
># db_recover -v -h /var/eyou/openldap/var/openldap-data
>db_recover: Program version 4.3 doesn't match environment version
>Finding last valid log LSN: file: 1 offset 572952
>Recovery starting from [1][469932]
>Recovery complete at Tue Dec 20 11:02:50 2005
>Maximum transaction ID 800000f4 Recovery checkpoint [1][574558]

Why autorecover can't do well as db_recover?