0

We are running openldap 2.3.43 on RHel 5.3.,Our LDAP server has been behaving erratically lately

1.It fails to stop when you issue command service ldap restart but it "seems" to starts OK

2.However after running command service ldap status it shows slapd is stopped

I have looked in the ldap.log file and the only errors worth mentioning are

Jun 25 22:11:14 myldapserver slapd[11593]: daemon IPv6 socket() errno=7 

Jun25 22:11:15 myldapserver slapd[11598]: bdb(cn=accesslog):file id2entry.bdb (meta pgno =0) has LSN [1}[900784]

Jun25 22:11:15 myldapserver slapd[11598]: bdb(cn=accesslog):end of log is [1][956]
Jun25 22:11:15 myldapserver slapd[11598]: bdb(cn=accesslog):/var/log/ldap/accesslog/id2entry.bdb:unexpected file or format

Jun25 22:11:15 myldapserver slapd[11598]: bdb_db_opendb_open(cn=accesslog):/var/log/ldap/accesslog/id2entry.bdb) failed: Invalid argument (22)

Jun25 22:11:15 myldapserver slapd[11598]: bdb(cn=accesslog):Unknown locker ID :0 


Jun25 22:11:15 myldapserver slapd[11598]: 
Jun25 22:11:15 myldapserver slapd[11598]: backend_startup_one: bi_db_open failed! (22) 
Jun25 22:11:15 myldapserver slapd[11598]: bd_db_close: alock close failed! 
Jun 25 22:11:15 myldapserver slapd[11598]: slapd stopped. 
Jun 25 22:11:15 myldapserver slapd[11598]: connections_destroy: nothing to destroy.

Any help would be greatly appreciated.

1 Answer 1

1

You have problem to open file /var/log/ldap/accesslog/id2entry.bdb, which is a part of ldap's database.

You can try these steps:

1) In the normal case, ldap's database is somewhere like /var/lib/ldap (but I have Ubuntu installed). Didn't you change a directory of database (you can see it in the /etc/ldap/slapd.conf or somewhere in /etc/ldap/slap.d/*, it is a parameter named directory) Try to search true location of file id2entry.dbd and use in config file right place.

2) Is your file id2entry.dbd accessible by openldap for read and write? Check permission of this file.

3) If your database is in the right location and have proper rights, try to repair of ldap's database by using this command:

/usr/sbin/slapd_db_recover -v -h /var/lib/ldap

(/var/lib/ldap is directory, where is placed id2entry.dbd file).

3
  • Jan Thanks very much i will try this and leave a feedback on here in a little while thansks so much for the reply though
    – Dominiqs
    Jun 27, 2012 at 14:34
  • I have tried this but nothing seem to work
    – Dominiqs
    Jul 10, 2012 at 13:13
  • 1
    What does mean "nothing seem to work"? What you tried? Where you have a id2entry.bdb file? Have you set this location in the /etc/ldapslapd.conf`? Is the error message the same as in the beginning?
    – Jan Marek
    Jul 11, 2012 at 8:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .