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

Re: good time to learn how to fix problems

On Sat, 2005-02-12 at 15:45 -0200, Andreas Hasenack wrote:
> On Fri, Feb 11, 2005 at 11:49:33PM -0700, Craig White wrote:
> > # cd /usr/local/var/openldap-data
> > # db_recover
> > 
> > # db_recover
> > db_recover: Ignoring log file: /usr/local/var/openldap-
> > logs/log.0000000001: magic number 0, not 40988
> > db_recover: Invalid log file: log.0000000001: Invalid argument
> > db_recover: PANIC: Invalid argument
> > db_recover: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
> > db_recover: DB_ENV->open: DB_RUNRECOVERY: Fatal error, run database
> > recovery
> Are you sure the db_recover binary you used is from the same installation
> of berkeley db that openldap is using?
that was a very good question because I do have the RHEL db4 and the
4.2.52 both on this computer but I checked first...

# which db_recover

so yes, I did use the same as openldap was using.

I gave up and did the dump and reload of my slapcat file and had pretty
much the same problem and figured out that it was the index files that
were giving me problems. So I dumped and reloaded again and did
slapindex after slapadd and that seemed to fix things and it is working
fine. That may have been my problem all along. I would have sworn that
someone said that slapindex after slapadd was unnecessary but that
doesn't appear to be the case with 2.2.19

I was looking at this as an exercise to properly recover damaged files
but I do have a cron script to slapcat the DSA at intervals to cover me
in these events. Of course the slapcat may not have the latest changes
since the last checkpoint.

Thanks - don't know why db_recover didn't work - it did work for me once
before when I had problems with the same installation on this machine
but I put that on the side and concentrated on a similar installation on
my own system at my house that allowed for easier testing - which has
worked flawlessly. I suspect that all along, the indexes have never been
working and if that is the case, then I have fixed the problem.