ejabberd: fixing the pubsub problem

Christian Kruse

After an update of ejabberd I got some very strange errors:

=ERROR REPORT==== 2013-11-11 09:50:38 ===E(<0.583.0>:mod_pubsub:3863) : transaction return internal error: {aborted,                                                                   {bad_type,                                                                    {pubsub_state,                                                                     {{[],                                                                       "pubsub.defunct.ch",                                                                       []},                                                                      23},                                                                     23,[],                                                                     owner,                                                                     []}}}

And loads of them, for each virtual host I'm hosting. The reason seems to be a changed mnesia table strcuture with a bug in checking for the old version after an upgrade: the table structure didn't get updated for me or failed to get updated, who knows.

The only way to get rid of this error I could find was dropping the table through the web admin interface. After a restart the table gets re-created. Don't worry about losing data: the pubsub module doesn't work with this corrupted table…