ejabberd does not start after upgrade
Environment
- ejabberd version: 24.12-3 (Debian trixie, upgraded from bookworm with apt dist-upgrade)
- Erlang version: Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 15.2.6
- OS: Debian
- Installed from: distro package
This is the second node in an ejabberd cluster setup.
Errors from error.log/crash.log
2025-04-21 10:52:06.402141+02:00 [error] <0.188.0>@ejabberd_mnesia:mnesia_op/2:431
Failure on mnesia transform_table [archive_msg,
#Fun<ejabberd_mnesia.8.102878464>,
[us,id,timestamp,peer,bare_peer,packet,
nick,type,origin_id]]: {aborted,
{"Bad transform function",
archive_msg,
#Fun<ejabberd_mnesia.8.102878464>,
'[email protected]',
{badfun,
#Fun<ejabberd_mnesia.8.102878464>}}}
2025-04-21 10:52:06.402902+02:00 [critical] <0.1109.0>@gen_mod:start_module/4:186
Failed to start module mod_mam: {error,db_failure}
2025-04-21 10:52:06.403065+02:00 [critical] <0.1109.0>@gen_mod:maybe_halt_ejabberd/0:285
ejabberd initialization was aborted because a module start failed.
Bug description
crash on startup after upgrade to Debian trixie from bookworm with apt dist-upgrade
Hello,
Do you know what older version of ejabberd you had installed? I think there should be dpkg.log in /var/log somewhere that should show info that contain this.
You followed the steps? https://docs.ejabberd.im/admin/upgrade/#specific-version-upgrade-notes ?
@prefiks Debian stable (bookworm) has ejabberd 23.01-1
@licaon-kter It's a dist-upgrade. That should take care of changes that happened between releases. I did look into the upgrade docs you mentioned but I couldn't find any relevant changes.
It seems the problem arises on sync of the mam tables in a cluster setup.
If the updated node is not in the cluster it does start up successfully. When I do a join_cluster in this state it breaks with the above message.
I added 67cc0c528667a5bcdeab0cf63cf8aa0d42c6f0c7 which i think should fix this.
@runout-at afaik Debian does not know which sql DB you have setup out of the 3 providers, or if you use the old schema or the new schema. Or maybe you don't use sql at all.
@prefiks Thx for the fast commit. I did report this at the debian package as I'm not familiar with erlang and I have no idea how to test your patch. Hopefully they will get this in the next stable as trixie is already in soft freeze. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103879
@licaon-kter The error message talks correctly about mnesia.
Sorry for the delay, I was traveling.
@prefiks The debian maintainer did provide a package with your fix but I get the same error.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103879#20 https://apt.debalance.de/pool/main/e/ejabberd/ejabberd_24.12-4_amd64.deb
@runout-at Have you made any progress on this?
no :(