Error with kopano-search after new install & import

Hello, everybody,

I have a UCS member running nothing but kopano:

WebApp: 3.5.14.2539+111.1
Kopano Core: 8.7.9
Z-Push: 2.4.5+0-0

I have reinstalled UCS and copied the database and the attachments directory back (as described in the documentation). It all works. Only kopano-search reports errors:

Mär 30 16:10:13 saturn kopano-search[475]: 2020-03-30 16:10:13,314 - index0 - ERROR - Traceback (most recent call last):
Mär 30 16:10:13 saturn kopano-search[475]:   File "/usr/lib/python3/dist-packages/kopano_search/__init__.py", line 129, in db_put
Mär 30 16:10:13 saturn kopano-search[475]:     db[key] = value
Mär 30 16:10:13 saturn kopano-search[475]:   File "/usr/lib/python3/dist-packages/bsddb3/__init__.py", line 248, in __setitem__
Mär 30 16:10:13 saturn kopano-search[475]:     _DeadlockWrap(wrapF)  # self.db[key] = value
Mär 30 16:10:13 saturn kopano-search[475]:   File "/usr/lib/python3/dist-packages/bsddb3/dbutils.py", line 67, in DeadlockWrap
Mär 30 16:10:13 saturn kopano-search[475]:     return function(*_args, **_kwargs)
Mär 30 16:10:13 saturn kopano-search[475]:   File "/usr/lib/python3/dist-packages/bsddb3/__init__.py", line 247, in wrapF
Mär 30 16:10:13 saturn kopano-search[475]:     self.db[key] = value
Mär 30 16:10:13 saturn kopano-search[475]: bsddb3.db.DBRunRecoveryError: (-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB0061 PANIC: Invalid argument')
Mär 30 16:10:13 saturn kopano-search[475]: During handling of the above exception, another exception occurred:
Mär 30 16:10:13 saturn kopano-search[475]: Traceback (most recent call last):
Mär 30 16:10:13 saturn kopano-search[475]:   File "/usr/lib/python3/dist-packages/kopano/log.py", line 103, in log_exc
Mär 30 16:10:13 saturn kopano-search[475]:     try: yield
Mär 30 16:10:13 saturn kopano-search[475]:   File "/usr/lib/python3/dist-packages/kopano_search/__init__.py", line 284, in update
Mär 30 16:10:13 saturn kopano-search[475]:     db_put(self.mapping_db, item.sourcekey, '%s %s' % (storeid, item.folder.entryid)) # ICS doesn't remember which store a change belongs to..
Mär 30 16:10:13 saturn kopano-search[475]:   File "/usr/lib/python3/dist-packages/kopano_search/__init__.py", line 129, in db_put
Mär 30 16:10:13 saturn kopano-search[475]:     db[key] = value
Mär 30 16:10:13 saturn kopano-search[475]:   File "/usr/lib/python3.5/contextlib.py", line 162, in __exit__
Mär 30 16:10:13 saturn kopano-search[475]:     self.thing.close()
Mär 30 16:10:13 saturn kopano-search[475]:   File "/usr/lib/python3/dist-packages/bsddb3/__init__.py", line 265, in close
Mär 30 16:10:13 saturn kopano-search[475]:     v = _DeadlockWrap(self.db.close)
Mär 30 16:10:13 saturn kopano-search[475]:   File "/usr/lib/python3/dist-packages/bsddb3/dbutils.py", line 67, in DeadlockWrap
Mär 30 16:10:13 saturn kopano-search[475]:     return function(*_args, **_kwargs)
Mär 30 16:10:13 saturn kopano-search[475]: bsddb3.db.DBRunRecoveryError: (-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB0060 PANIC: fatal region error detected; run recovery')

what could be the problem?

with best
sven

Hi @pixel,

did you also (try) to copy the search index?

Seems the search index got somehow corrupted. The easiest is to delete it (stop kopano-search, delete /var/lib/kopano/search/, start kopano-search again).

this is what I did after importing the data

hm… from the above error message the database the search index is stored in is corrupt. If this happens on a regular basis I’d check the underlying hardware.

this index will be completely rebuilt when I rebuild the directory:
/var/lib/kopano/search/
delete? Then I’ll test it again

yes, if you delete the folder the whole index will be rebuild.

Mastodon