zmslapcat problem after upgrade from 8.7 to 8.8

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
seidler
Posts: 21
Joined: Fri Jun 30, 2017 8:28 am

zmslapcat problem after upgrade from 8.7 to 8.8

Post by seidler »

Hi,

I'm getting this message:

Code: Select all

5b88f3bd mdb_db_open: database "": mdb_dbi_open(/opt/zimbra/data/ldap/mdb/db/id2v) failed: MDB_NOTFOUND: No matching key/data pair found (-30798).
5b88f3bd backend_startup_one (type=mdb, suffix=""): bi_db_open failed! (-30798)
slap_startup failed
whenever I run /opt/zimbra/libexec/zmslapcat after upgrading from 8.7 to 8.8 (ZCS). I use this to make a daily backup of the LDAP database. The config database backs up fine.

I checked, and the mentioned file /opt/zimbra/data/ldap/mdb/db/id2v has never existed, not on 8.7, not on 8.8. All services, including ldap, are reported to work fine and I don't see any apparent problems.

How can I make the backups work again, and is this missing file something to be concerned about?
halfgaar
Advanced member
Advanced member
Posts: 172
Joined: Sat Sep 13, 2014 12:54 am
Location: Netherlands
ZCS/ZD Version: Ubuntu 18.04, 8.8.15_P43
Contact:

Re: zmslapcat problem after upgrade from 8.7 to 8.8

Post by halfgaar »

I'm having the same issue with Zimbra 8.7.7_GA_1787. It started when I upgraded zimbra-openldap-server to 2.4.46-1zimbra8.7b2.14.04 yesterday.

Dumping the config database with '/opt/zimbra/libexec/zmslapcat -c /tmp/dir' does work.

I ran an strace on the underlying command that is run (/opt/zimbra/common/sbin/slapcat -F /opt/zimbra/data/ldap/config -b "" -l /tmp/debugslapcat.ldiff). The relevant bit is:

Code: Select all

stat("/opt/zimbra/data/ldap/mdb/db", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/opt/zimbra/data/ldap/mdb/db/data.mdb", O_RDONLY) = 4
open("/opt/zimbra/data/ldap/mdb/db/lock.mdb", O_RDWR|O_CREAT|O_CLOEXEC, 0600) = 5
fcntl(5, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = -1 EAGAIN (Resource temporarily unavailable)
fcntl(5, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=1}) = 0
lseek(5, 0, SEEK_END)                   = 8192
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED, 5, 0) = 0x7f86f7c9e000
fstatfs(4, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=25770312, f_bfree=12345554, f_bavail=11034834, f_files=6553600, f_ffree=5868188, f_fsid={-1334687925, -1613637921}, f_namelen=255, f_frsize=4096}) = 0
uname({sys="Linux", node="meel", ...})  = 0
pread(4, "\0\0\0\0\0\0\0\0\0\0\10\0\0\0\0\0\336\300\357\276\1\0\0\0\0\0\0\0\0\0\0\0"..., 152, 0) = 152
pread(4, "\1\0\0\0\0\0\0\0\0\0\10\0\0\0\0\0\336\300\357\276\1\0\0\0\0\0\0\0\0\0\0\0"..., 152, 4096) = 152
mmap(NULL, 52710469632, PROT_READ, MAP_SHARED, 4, 0) = 0x7f7aac89b000
fcntl(5, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=27104, len=1}) = 0
write(2, "5b9e02de mdb_db_open: database \""..., 147) = 147
munmap(0x7f7aac89b000, 52710469632)     = 0
close(4)                                = 0
munmap(0x7f86f7c9e000, 8192)            = 0
close(5)                                = 0
write(2, "5b9e02de backend_startup_one (ty"..., 80) = 80
write(2, "slap_startup failed\n", 20)   = 20
exit_group(1)
It sets a lock on lock.mdb, but I'm not sure how to interpret that setting a write lock fails first, but then the read lock works. It does read stuff from the file, so it seems to work. It really just seems to be looking for keys that don't exist.
seidler
Posts: 21
Joined: Fri Jun 30, 2017 8:28 am

Re: zmslapcat problem after upgrade from 8.7 to 8.8

Post by seidler »

AAAh, someone has found the cause and the very simple solution here: viewtopic.php?f=15&t=64805

Just run

Code: Select all

zmsshkeygen
zmupdateauthkeys
That is all.
halfgaar
Advanced member
Advanced member
Posts: 172
Joined: Sat Sep 13, 2014 12:54 am
Location: Netherlands
ZCS/ZD Version: Ubuntu 18.04, 8.8.15_P43
Contact:

Re: zmslapcat problem after upgrade from 8.7 to 8.8

Post by halfgaar »

Hmm, that didn't help me...
halfgaar
Advanced member
Advanced member
Posts: 172
Joined: Sat Sep 13, 2014 12:54 am
Location: Netherlands
ZCS/ZD Version: Ubuntu 18.04, 8.8.15_P43
Contact:

Re: zmslapcat problem after upgrade from 8.7 to 8.8

Post by halfgaar »

Addendum: I rebooted my server, and it works now.
Post Reply