ejabberd 17.11 issue with mod_muc

Hello ,

I have installed ejabberd 17.11 from binary and configured with postgres. While starting i get an error starting mod_muc. If i comment the mod_muc, then it comes.

mod_muc config:

    ## host: "conference.@HOST@"
      - allow
      - allow: admin
    access_create: muc_create
    access_persistent: muc_create

Could you please advice / share best configs for mod muc + 17.11. ? Uncommenting Host did not work as well.
Thank you very much in advance.


Anand XMPP wrote: While

Anand XMPP wrote:

While starting i get an error starting mod_muc.

Can you show the error that you get?

Thanks Badlop for getting

Thanks Badlop for getting back on my query. When we are doing change in the configuration for multiuser chat, then this problem occurs. To recover, we have to delete the multiuser tables & then Ejabberd starts.

Below are the Error Logs:

2017-12-22 07:32:47.738 [debug] <0.311.0>@ejabberd_sql:sql_query_internal:586 SQL: "select name, opts from muc_room where host='conference.mycompany.com'"
2017-12-22 07:32:47.739 [debug] <0.312.0>@ejabberd_sql:sql_query_internal:586 SQL: "select room, jid, nick, nodes from muc_room_subscribers where host='conference.mycompany.com'"
2017-12-22 07:32:47.740 [error] <0.390.0>@mod_muc:-opts_to_binary/1-fun-2-:826 CRASH REPORT Process <0.390.0> with 0 neighbours exited with reason: bad argument in call to erlang:iolist_to_binary([{text,<<>>,<<"Friday">>}]) in mod_muc:'-opts_to_binary/1-fun-2-'/1 line 826
2017-12-22 07:32:47.741 [critical] <0.239.0>@gen_mod:start_module:212 Problem starting the module mod_muc for host mycompany.com
options: [{db_type,sql},
error: {error,{{badarg,[{erlang,iolist_to_binary,
2017-12-22 07:32:47.741 [critical] <0.239.0>@gen_mod:maybe_halt_ejabberd:294 ejabberd initialization was aborted because a module start failed.

More Info: I also observe

More Info:
I also observe that the destroyed rooms are copied into DB again.

Looking at the error text, it

Looking at the error text, it seems that a room has some option with an unexpected type of value. How do you create and configure the rooms: using a Jabber/XMPP client, or using ejabberdctl commands, or modifying the database directly?

Thanks for your reply...I am

Thanks for your reply...I am modifying (toggling) only this parameters for muc configuration.


This problem is not seen with mnesia database. Only when we have sql databases (postgres ) & while restarting we get this issue. Without restart, it continues to work. To recover from this issue, deleting the tables on the database , then restart ejabberdctl works.


Full schema table below:

The error text says the crash

The error text says the crash occurs when reading the muc_room database table, and converting the room options to erlag format, and mentions a text friday.

I asked you how do you create and configure the rooms, and you didn't reply.

It would also help to know: get from your SQL database the item that makes ejabberd crash. Maybe it has some subject set, or some title or description?

Thanks Badlop for your

Thanks Badlop for your response.

We are using android client APIs to write to server.

More update on the issue:
If we manually overwrite the mysql database with empty table contents for "subject & subject_author", then ejabberd starts without any issue.
Sample Below:

Notworking with the below contents:
{subject,[{text,<<>>,<<"group chat">>}]},

Is this a ejabberd-17.11 bug ?


I confirm in older releases

I confirm in older releases it was like {subject,<<>>}, and in 17.12 it's {subject,[{text,<<>>,<<"group chat">>}]},

I have tested with 17.12, and a room with subject is recreated correctly after server start. So it seems a bug in 17.11, probably fixed with https://github.com/processone/ejabberd/commit/a57c694f218294812f9c228f47...

Thanks badlop for your

Thanks badlop for your update. Will try 17.12

Syndicate content