Univention Bugzilla – Bug 50738
Add Nagios check for corruption of Samba LDB files
Last modified: 2023-06-20 10:13:05 CEST
In Ticket #2020012221000684 a customer reported corruption of the file /var/lib/samba/private/sam.ldb.d/DC=DOMAINDNSZONES,DC=CUSTOMERDOMAIN,DC=LOCAL . In this case the structure of the TDB-Key-Value-Database file was corrpupt: root@ucs-master:/var/log/univention# tdbtool /var/lib/samba/private/sam.ldb.d/DC\=DOMAINDNSZONES\,DC\=CUSTOMERDOMAIN\,DC\=LOCAL.ldb tdb> check Hashes do not match records Integrity check for the opened database failed. tdb> To make things worse, the last successful /var/univention-backup/samba file was more than one month old. Apparently the error emails from the cron backup job went unnoticed ( Bug #49399 , http://errata.software-univention.de/ucs/4.4/162.html ). We should help customers to notice this ASAP by adding a Nagios check, that verifies the consitency of the TDB-structure of all of the LDB-Files.
For reference here is the syslog message that showed the problem: =========================================================================== Jan 22 13:54:19 master named[12779]: samba_dlz: added rdataset foomar.customerdomain.local 'foobar.customerdomain.local.#0111200#011IN#011A#0111 0.12.11.10' Jan 22 13:54:19 master named[12779]: samba_dlz: ldb: ltdb: tdb(/var/lib/samba/private/sam.ldb.d/DC=DOMAINDNSZONES,DC=CUSTOMERDOMAIN,DC=LOCAL.ldb): tdb_rec_read bad magic 0xd9fee666 at offset=5188824 Jan 22 13:54:19 master named[12779]: samba_dlz: Jan 22 13:54:19 master named[12779]: samba_dlz: failed to commit a transaction for zone customerdomain.local Jan 22 13:54:19 master named[12779]: sdlz closeversion on origin customerdomain.local failed Jan 22 13:54:19 master named[12779]: ../../../lib/dns/db.c:459: ENSURE(*versionp == ((void *)0)) failed, back trace Jan 22 13:54:19 master named[12779]: #0 0x56463ba1d560 in ?? Jan 22 13:54:19 master named[12779]: #1 0x7f3397aac97a in ?? Jan 22 13:54:19 master named[12779]: #2 0x7f339915d6b2 in ?? Jan 22 13:54:19 master named[12779]: #3 0x56463ba4a51e in ?? Jan 22 13:54:19 master named[12779]: #4 0x7f3397ad09f3 in ?? Jan 22 13:54:19 master named[12779]: #5 0x7f3396dff4a4 in ?? Jan 22 13:54:19 master named[12779]: #6 0x7f3396250d0f in ?? Jan 22 13:54:19 master named[12779]: exiting (due to assertion failure) ===========================================================================