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

Re: keep getting errors on this DSA



On Tue, 2005-02-15 at 16:59 +1100, Dave Horsfall wrote:
> [ Please ignore the "Cc: x@ci.com.au" on my last message; that was my
>   stuff-up ]
> 
> On Mon, 14 Feb 2005, Craig White wrote:
> 
> > But if db_verify doesn't work, why does db_recover work? I am seeking a
> > way to verify the files as I am getting errors.
> 
> db_verify works on the *.bdb files, and db_recover on the entire directory 
> of files.
> 
> > Feb 14 21:51:52 srv1 slapd[19039]: bdb(dc=tobyhouse,dc=com): Invalid log
> > file: log.0000000001: No such file or directory
> 
> This is suspicious.  Have you put the log files elsewhere, and not chown'd 
> them to ldap:ldap?
----
evidently I have...

# ls -l log.0000000001
-rw-------    1 ldap     ldap       422547 Feb 14 22:52 log.0000000001
[root@srv1 openldap-data]# ls -l ../openldap-logs/
total 8
-rw-------    1 ldap     ldap       423029 Feb 14 23:10 log.0000000001
[root@srv1 openldap-data]#

so I will retrace my steps...

# mv DB_CONFIG ../
# rm -fr *
# rm -fr ../openldap-logs/*
# > /var/log/slapd.log
# /usr/local/sbin/slapadd -l /root/slapcat.ldif
# chown ldap:ldap *bdb
# chown ldap:ldap __db.00*
# ls -l
total 2660
-rw-------    1 ldap     ldap        86016 Feb 14 23:24 cn.bdb
-rw-------    1 ldap     ldap        16384 Feb 14 23:24 __db.001
-rw-------    1 ldap     ldap       278528 Feb 14 23:24 __db.002
-rw-------    1 ldap     ldap        98304 Feb 14 23:24 __db.003
-rw-------    1 ldap     ldap       450560 Feb 14 23:24 __db.004
-rw-------    1 ldap     ldap        24576 Feb 14 23:24 __db.005
-rw-------    1 ldap     ldap         8192 Feb 14 23:24 displayName.bdb
-rw-------    1 ldap     ldap        77824 Feb 14 23:24 dn2id.bdb
-rw-------    1 ldap     ldap         8192 Feb 14 23:24 gidNumber.bdb
-rw-------    1 ldap     ldap         8192 Feb 14 23:24 givenName.bdb
-rw-------    1 ldap     ldap       229376 Feb 14 23:24 id2entry.bdb
-rw-------    1 root     root      1515849 Feb 14 23:24 log.0000000001
-rw-------    1 ldap     ldap         8192 Feb 14 23:24 mail.bdb
-rw-------    1 ldap     ldap         8192 Feb 14 23:24 memberUid.bdb
-rw-------    1 ldap     ldap        20480 Feb 14 23:24 objectClass.bdb
-rw-------    1 ldap     ldap         8192 Feb 14 23:24
sambaDomainName.bdb
-rw-------    1 ldap     ldap         8192 Feb 14 23:24
sambaPrimaryGroupSID.bdb
-rw-------    1 ldap     ldap         8192 Feb 14 23:24 sambaSID.bdb
-rw-------    1 ldap     ldap         8192 Feb 14 23:24 sn.bdb
-rw-------    1 ldap     ldap         8192 Feb 14 23:24 uid.bdb
-rw-------    1 ldap     ldap         8192 Feb 14 23:24 uidNumber.bdb
# mv ../DB_CONFIG .
# service ldap-new start
Starting slapd:                                            [  OK  ]
# less /var/log/slapd.log
# cat /var/log/slapd.log
Feb 14 23:25:29 srv1 slapd[19344]: @(#) $OpenLDAP: slapd 2.2.23 (Feb 14
2005 21:08:52) $        root@srv1.tobyhouse.com:/opt/build-
openldap/openldap-2.2.23/servers/slapd
Feb 14 23:25:29 srv1 slapd[19344]: bdb_back_initialize: Sleepycat
Software: Berkeley DB 4.2.52: (December  3, 2003)
Feb 14 23:25:29 srv1 slapd[19344]: bdb_back_initialize: Sleepycat
Software: Berkeley DB 4.2.52: (December  3, 2003)
Feb 14 23:25:29 srv1 slapd[19344]: bdb_db_init: Initializing BDB
database
Feb 14 23:25:29 srv1 slapd[19345]: slapd starting

finally - no errors  ;-)

apparently the log in ../openldap-logs is ldap:ldap - that is controlled
by slapd and I didn't set it. 

just to check, I stopped slapd

and then...

/usr/local/bin/db_verify *bdb
looks ok

# /usr/local/bin/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

and a check of my slapd.log after this shows my shutdown and then errors
from above...

Feb 14 23:31:54 srv1 slapd[19387]: slapd shutdown: waiting for 0 threads
to terminate
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): Ignoring
log file: /usr/local/var/openldap-logs/log.0000000001: magic number 0,
not 40988
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): DB_ENV-
>log_put: 1: Invalid argument
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): Ignoring
log file: /usr/local/var/openldap-logs/log.0000000001: magic number 0,
not 40988
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): DB_ENV-
>log_put: 1: Invalid argument
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): Ignoring
log file: /usr/local/var/openldap-logs/log.0000000001: magic number 0,
not 40988
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): DB_ENV-
>log_put: 1: Invalid argument
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): Ignoring
log file: /usr/local/var/openldap-logs/log.0000000001: magic number 0,
not 40988
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): DB_ENV-
>log_put: 1: Invalid argument
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): Ignoring
log file: /usr/local/var/openldap-logs/log.0000000001: magic number 0,
not 40988
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): DB_ENV-
>log_put: 1: Invalid argument
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com):
txn_checkpoint: failed to flush the buffer cache Invalid argument
Feb 14 23:31:54 srv1 slapd[19387]: bdb_db_destroy: txn_checkpoint
failed: Invalid argument (22)
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): Ignoring
log file: /usr/local/var/openldap-logs/log.0000000001: magic number 0,
not 40988
Feb 14 23:31:54 srv1 slapd[19387]: bdb(dc=tobyhouse,dc=com): DB_ENV-
>log_put: 1: Invalid argument
Feb 14 23:31:54 srv1 slapd[19387]: bdb_db_destroy: close failed: Invalid
argument (22)
Feb 14 23:31:54 srv1 slapd[19387]: slapd stopped.

Am I really dense?

Is my problem coming from transactions patches for db4 and openldap that
I found linked from Quanah's notations? Should I reverse them, make
clean and then make/make test/make install again on both db4 and
openldap-2.2.23?

Thanks

Craig