Migration to 11.x failed: Migration 0021_migrate_to_bullseye did not complete, aborting. Error: Failed to reinstall mariadb-common?

Opening a new thread because the OP of another thread describing the same issue marked it as resolved, even though it was not. I’m trying to avoid a re-install; I and others use this server every day.

My YunoHost server

Hardware: VPS bought online
YunoHost version: (stable)
I have access to my server : Through SSH & through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : No

Description of my issue

I am attempting to migrate to 11.x, but receive the following error, per the full log: Migration 0021_migrate_to_bullseye did not complete, aborting. Error: Failed to reinstall mariadb-common ?

sudo apt --fix-broken install returns:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  cpp-8 dh-python fonts-mathjax gstreamer1.0-plugins-base libasan5 libcdio18
  libcdparanoia0 libcodec2-0.8.1 libcrystalhd3 libdc1394-22 libdouble-conversion1
  libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libisl19 libjs-coffeescript
  libjs-mathjax libkyotocabinet16v5 libmpx2 libmysofa0 liborc-0.4-0 libpodofo0.9.6
  libpoppler82 libpython2.7 libpython3.7-dev libqt5sensors5 libqt5webkit5
  libvisual-0.4-0 libwoff1 libx264-155 python-libxml2 python-pkg-resources
  python-six python3-entrypoints
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libssl1.1 nslcd-utils python-pkg-resources python-six
Suggested packages:
The following packages will be REMOVED:
  libstdc++-8-dev python-apsw python-backports.functools-lru-cache python-bs4
  python-cffi-backend python-cherrypy3 python-crypto python-css-parser
  python-cssselect python-cssutils python-dateutil python-dbus python-dnspython
  python-enum34 python-feedparser python-gpg python-html5lib python-ipaddress
  python-lxml python-mechanize python-msgpack python-netifaces python-olefile
  python-pil python-pygments python-pyparsing python-pyqt5.qtsvg python-regex
  python-repoze.lru python-routes python-simplejson python-sip python-soupsieve
  python-talloc python-utidylib python-webencodings python-webob python3.7-venv
The following packages will be upgraded:
  libssl1.1 nslcd-utils python-pkg-resources python-six
4 upgraded, 0 newly installed, 38 to remove and 792 not upgraded.
241 not fully installed or removed.
Need to get 0 B/1,815 kB of archives.
After this operation, 40.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Setting up slapd (2.4.57+dfsg-3+deb11u1) ...
  Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.47+dfsg-3+deb10u7... done.
Job for slapd.service failed because the control process exited with error code.
See "systemctl status slapd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript slapd, action "restart" failed.
● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)
     Loaded: loaded (/etc/init.d/slapd; generated)
    Drop-In: /lib/systemd/system/slapd.service.d
     Active: activating (auto-restart) (Result: exit-code) since Mon 2022-08-29 15:46:31 EDT; 9ms ago
       Docs: man:systemd-sysv-generator(8)
    Process: 26169 ExecStart=/etc/init.d/slapd start (code=exited, status=1/FAILURE)
      Tasks: 4 (limit: 4915)
     Memory: 4.0M
     CGroup: /system.slice/slapd.service
             └─6896 /usr/sbin/slapd -h ldap:// ldaps:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d

Aug 29 15:46:31 [DOMAIN] systemd[1]: slapd.service: Control process exited, code=exited, status=1/FAILURE
Aug 29 15:46:31 [DOMAIN] systemd[1]: slapd.service: Failed with result 'exit-code'.
Aug 29 15:46:31 [DOMAIN] systemd[1]: slapd.service: Unit process 6896 (slapd) remains running after unit stopped.
Aug 29 15:46:31 [DOMAIN] systemd[1]: Failed to start LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol).
dpkg: error processing package slapd (--configure):
 installed slapd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
1 Like

Hmokay I’m not quite sure to understand why slapd is failing as it seems to have no relation with the rest of the issue …

First I would try to clean as much mess as we can by simply removing python(2) which seems problematic:

apt remove python

Hi Aleks, thanks for your reply. I managed to get the migration to work before I saw your response; I think the failure may have something with an incomplete removal of firefly-iii causing issues. In addition to a couple reboot cycles, I did the following:

  • sudo dpkg --configure -a
  • Delete /etc/php/7.4/fpm/pool.d/firefly-iii.conf
  • Install php7.4-fpm
  • run sudo apt --fix-broken install
  • run sudo yunohost tools migrations run --accept-disclaimer

after which the migration was successfully completed.

For context: I have had strange issues ever since installing firefly-iii (such as being unable to install or update apps), which was many updates ago. When experiencing these issues some time ago, I removed php7.4-fpm after finding this thread, which appeared to resolve them for a while.


Thank you Nathan, your solution helped me recover after a failed bullseye migration that also showed the slapd error message.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.