Author Topic: LDAP DB problems with Zentyal 2.0.16 on Natty after reboot  (Read 5160 times)

emmjott

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Hi everyone,

i just installed a fresh copy of Zentyal 2.0.16 on Ubuntu Server 11.04 (Natty) from the official Ubuntu repositories.
Unfortunately, Natty is a must-have due to some dependency issues related to kernel encryption-features.

Zentyal itself is working fine, except for one thing:
When i reboot the machine, it seems that slapd does not get shut down correctly, therefore the LDAP DB goes corrupt, _every_ reboot.
Luckily this installation is not productive yet, so I can rebuild the DB using db4.8_recovery, slapcat and slapadd.

Does anyone else experience this on Natty (I assume this is specific to Natty since I couldn't reproduce this on Lucid 10.04)?

Regards from Germany,
Markus

EDIT:
slapd error message look like this
Code: [Select]
May 19 22:27:42 ux01 slapd[1918]: @(#) $OpenLDAP: slapd 2.4.23 (Apr  7 2011 18:00:55) $#012#011buildd@allspice:/build/buildd/openldap-2.4.23/debian/build/servers/slapd
May 19 22:27:42 ux01 slapd[1919]: hdb_db_open: database "dc=ux01,dc=home,dc=local": unclean shutdown detected; attempting recovery.
May 19 22:27:42 ux01 slapd[1919]: hdb_db_open: database "dc=home,dc=local": unclean shutdown detected; attempting recovery.
May 19 22:27:42 ux01 slapd[1919]: slapd starting
May 19 22:27:42 ux01 slapd[1919]: bdb(dc=ux01,dc=home,dc=local): PANIC: fatal region error detected; run recovery
It even seems that a simple "service slapd restart" or "/etc/init.d/slapd restart" kills the DB.

Here's my log after "service slapd stop":
Code: [Select]
May 20 12:47:45 ux01 slapd[6213]: daemon: shutdown requested and initiated.
May 20 12:47:45 ux01 slapd[6213]: slapd shutdown: waiting for 0 operations/tasks to finish
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): PANIC: fatal region error detected; run recovery
May 20 12:47:45 ux01 slapd[6213]: last message repeated 12 times
May 20 12:47:45 ux01 slapd[6213]: bdb_db_close: database "dc=ux01,dc=home,dc=local": txn_checkpoint failed: DB_RUNRECOVERY: Fatal error, run database recovery (-30974).
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): File handles still open at environment close
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): Open file handle: /var/lib/ldap/id2entry.bdb
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): Open file handle: /var/lib/ldap/dn2id.bdb
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): Open file handle: /var/lib/ldap/objectClass.bdb
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): Open file handle: /var/lib/ldap/log.0000000001
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): Open file handle: /var/lib/ldap/entryUUID.bdb
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): Open file handle: /var/lib/ldap/entryCSN.bdb
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): Open file handle: /var/lib/ldap/cn.bdb
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): Open file handle: /var/lib/ldap/gidNumber.bdb
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): Open file handle: /var/lib/ldap/memberUid.bdb
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=ux01,dc=home,dc=local): PANIC: fatal region error detected; run recovery
May 20 12:47:45 ux01 slapd[6213]: bdb_db_close: database "dc=ux01,dc=home,dc=local": close failed: DB_RUNRECOVERY: Fatal error, run database recovery (-30974)
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=home,dc=local): PANIC: fatal region error detected; run recovery
May 20 12:47:45 ux01 slapd[6213]: last message repeated 3 times
May 20 12:47:45 ux01 slapd[6213]: bdb_db_close: database "dc=home,dc=local": txn_checkpoint failed: DB_RUNRECOVERY: Fatal error, run database recovery (-30974).
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=home,dc=local): File handles still open at environment close
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=home,dc=local): Open file handle: /var/lib/ldap/id2entry.bdb
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=home,dc=local): Open file handle: /var/lib/ldap/dn2id.bdb
May 20 12:47:45 ux01 slapd[6213]: bdb(dc=home,dc=local): PANIC: fatal region error detected; run recovery
May 20 12:47:45 ux01 slapd[6213]: bdb_db_close: database "dc=home,dc=local": close failed: DB_RUNRECOVERY: Fatal error, run database recovery (-30974)
May 20 12:47:45 ux01 slapd[6213]: slapd stopped.
So why are there still file handles open, this can't be good?

Furthermore, after a recovery of the LDAP database, slapd runs as long as Zentyal doesn't try to query something. As soon as I try to do something to Users and Groups, slapd panics and quits.
« Last Edit: May 20, 2011, 01:06:46 pm by emmjott »
The answer is 42 or reboot.

emmjott

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: LDAP DB problems with Zentyal 2.0.16 on Natty after reboot
« Reply #1 on: May 31, 2011, 12:02:43 pm »
*bump*
Am i the only one using Zentyal on Ubuntu 11.04? :(
Can anyone tell me which LDAP DB backend-type Zentyal is using by default, HDB or BDB?
I am suspecting that there might be a mismatch, as 11.04 is using BDB by default and 10.04 uses HDB.
Also, i am guessing that 11.04 installs slapd with its BDB default database and Zentyal fills the database assuming it's an HDB.

Still, I could not find a way to change slapd's DB backend type to HDB.
The answer is 42 or reboot.

Sam Graf

  • Guest
Re: LDAP DB problems with Zentyal 2.0.16 on Natty after reboot
« Reply #2 on: May 31, 2011, 02:42:07 pm »
I'm guessing that the number of people using Zentyal on top of 11.04 might be low, since the preferred method is to use the fully supported LTS versions. Nevertheless, Zentyal is supposed to be working on top of 11.04 with a subset of its modules.

Hopefully one of the developers will comment on what might be going on.

jsalamero

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1419
  • Karma: +45/-1
    • View Profile
Re: LDAP DB problems with Zentyal 2.0.16 on Natty after reboot
« Reply #3 on: May 31, 2011, 08:13:50 pm »
Do you experience these problems after doing:

/etc/init.d/ebox users restart ?

/etc/init.d/slapd restart

/etc/init.d/ebox restart ? (do it physically on the host)

emmjott

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: LDAP DB problems with Zentyal 2.0.16 on Natty after reboot
« Reply #4 on: June 03, 2011, 01:51:04 pm »
Hi there,

the same applies to the command

/etc/init.d/slapd restart

Unfortunately, right now i'm unable to bring the system in a state, where the initial configuration of usersandgroups works fine. When i install ebox-usersandgroups, complete the curses-based wizard (Zentyal port, LDAP master password and so on..) and activate the users module, the initial configuration takes place and when i click "Save changes", the operation fails because no successful bind to the ldap server could be made.
The answer is 42 or reboot.