#992588 fail2ban: Fail2ban fails to upgrade database after upgrading from Buster to Bullseye

#992588#5
Date:
2021-08-20 15:08:03 UTC
From:
To:
Dear Maintainer,

I just upgraded from Debian 10 (Buster) to Debian 11 (Bullseye).

It appears that Fail2ban does not work anymore. 'fail2ban-client status' does not show any jail working.

At fail2ban's startup, the following error is written to /var/log/fail2ban.log:
INFO    Starting Fail2ban v0.11.2
INFO    Observer start...
INFO    Connected to fail2ban persistent database '/var/lib/fail2ban/fail2ban.sqlite3'
INFO    Upgrade database: /var/lib/fail2ban/fail2ban.sqlite3.20210820-143555 from version '2'
INFO      Database backup created: /var/lib/fail2ban/fail2ban.sqlite3.20210820-143555
ERROR   Failed to upgrade database '/var/lib/fail2ban/fail2ban.sqlite3': database disk image is malformed

Deleting the old database leads to the creation of a fresh one, redering fail2ban working - but loses all history.
I suspect this bug being related to upstream issue #2796 [https://github.com/fail2ban/fail2ban/issues/2796].

Regards,
Julien

*** End of the template - remove these template lines ***