Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod_muc_log errors instead of logging #1

Open
aaronbrashears opened this issue Sep 16, 2010 · 3 comments
Open

mod_muc_log errors instead of logging #1

aaronbrashears opened this issue Sep 16, 2010 · 3 comments

Comments

@aaronbrashears
Copy link

Hi there. I pulled the master branch, built according to instructions and installed it into my instance of ejabberd. I reloaded the modules from the webadmin and got similar results so I restarted ejabberd to make sure. It appears that with mod_muc and mod_muc_log disagree on the communication protocol. I am using ejabberd 2.1.3 on erlang R13b with mod_muc and mod_muc_log configured configured as:

  {mod_muc,      [
          %%{host, "conference.@HOST@"},
          {access, muc},
          {access_create, muc},
          {access_persistent, muc},
          {access_admin, muc_admin},
          {max_users, 500}
         ]},
  {mod_muc_log,[
                 {outdir, "/var/log/ejabberd/muclogs"}
               ]},

The outdir /var/log/ejabberd/muclogs is chown ejabberd:adm, owner and group writable, and ejabberd runs as the ejabberd user.

When the room is created, there is no problem.

=INFO REPORT==== 2010-09-16 09:37:19 ===
I(<0.418.0>:mod_muc_room:149) : Created MUC room [email protected] by user@localhost/luxuria

Then, when logging is enabled, we see the first error in ejabberd.log:

=ERROR REPORT==== 2010-09-16 09:37:32 ===
E(<0.403.0>:mod_muc_log:173) : {badarg,
                                [{lists,keysearch,
                                  [title,1,
                                   {state,"chat","conference.localhost",
                                    "localhost",
                                    {muc,muc,muc_admin,muc},
                                    muc_storage_default,muc_room_default,
                                    {jid,"chat","conference.localhost",[],
                                     "chat","conference.localhost",[]},
                                    {config,[],[],true,true,true,true,true,
                                     false,200,true,true,true,false,true,
                                     false,false,false,[],true,true,[]},
                                    {dict,1,16,16,8,80,48,
                                     {[],[],[],[],[],[],[],[],[],[],[],[],[],
                                      [],[],[]},
                                     {{[],[],[],[],[],[],[],[],[],[],[],[],
                                       [[{"user","localhost","luxuria"}|
                                         {user,
                                          {jid,"user","localhost",
                                           "luxuria","user","localhost",
                                           "luxuria"},
                                          "user",moderator,
                                          {xmlelement,"presence",
                                           [{"xml:lang","en"},
                                            {"to",
                                             "[email protected]/user"}],
                                           [{xmlelement,"priority",[],
                                             [{xmlcdata,<<"5">>}]},
                                            {xmlelement,"c",
                                             [{"xmlns",
                                               "http://jabber.org/protocol/caps"},
                                              {"node",
                                               "http://psi-im.org/caps"},
                                              {"ver","0.13-dev-rev2"},
                                              {"ext","cs ep-notify html"}],
                                             []}]}}]],
                                       [],[],[]}}},
                                    {dict,0,16,16,8,80,48,
                                     {[],[],[],[],[],[],[],[],[],[],[],[],[],
                                      [],[],[]},
                                     {{[],[],[],[],[],[],[],[],[],[],[],[],[],
                                       [],[],[]}}},
                                    {dict,1,16,16,8,80,48,
                                     {[],[],[],[],[],[],[],[],[],[],[],[],[],
                                      [],[],[]},
                                     {{[[{"user","localhost",[]}|owner]],
                                       [],[],[],[],[],[],[],[],[],[],[],[],[],
                                       [],[]}}},
                                    {lqueue,{[],[]},0,20},
                                    [],[],false,nil,none,
                                    {[],[]}}]},
                                 {mod_muc_log,get_room_info,2},
                                 {mod_muc_log,add_message_to_log,5},
                                 {mod_muc_log,handle_cast,2},
                                 {gen_server,handle_msg,5},
                                 {proc_lib,init_p_do_apply,3}]}

And upon saying something ('test'), we get the following error:

=ERROR REPORT==== 2010-09-16 09:40:24 ===
E(<0.403.0>:mod_muc_log:173) : {badarg,
                                [{lists,keysearch,
                                  [title,1,
                                   {state,"chat","conference.localhost",
                                    "localhost",
                                    {muc,muc,muc_admin,muc},
                                    muc_storage_default,muc_room_default,
                                    {jid,"chat","conference.localhost",[],
                                     "chat","conference.localhost",[]},
                                    {config,[],[],true,true,true,true,true,
                                     false,200,true,true,true,false,true,
                                     false,false,false,[],true,true,[]},
                                    {dict,1,16,16,8,80,48,
                                     {[],[],[],[],[],[],[],[],[],[],[],[],[],
                                      [],[],[]},
                                     {{[],[],[],[],[],[],[],[],[],[],[],[],
                                       [[{"user","localhost","luxuria"}|
                                         {user,
                                          {jid,"user","localhost",
                                           "luxuria","user","localhost",
                                           "luxuria"},
                                          "user",moderator,
                                          {xmlelement,"presence",
                                           [{"xml:lang","en"},
                                            {"to",
                                             "[email protected]/user"}],
                                           [{xmlelement,"priority",[],
                                             [{xmlcdata,<<"5">>}]},
                                            {xmlelement,"c",
                                             [{"xmlns",
                                               "http://jabber.org/protocol/caps"},
                                              {"node",
                                               "http://psi-im.org/caps"},
                                              {"ver","0.13-dev-rev2"},
                                              {"ext","cs ep-notify html"}],
                                             []}]}}]],
                                       [],[],[]}}},
                                    {dict,0,16,16,8,80,48,
                                     {[],[],[],[],[],[],[],[],[],[],[],[],[],
                                      [],[],[]},
                                     {{[],[],[],[],[],[],[],[],[],[],[],[],[],
                                       [],[],[]}}},
                                    {dict,1,16,16,8,80,48,
                                     {[],[],[],[],[],[],[],[],[],[],[],[],[],
                                      [],[],[]},
                                     {{[[{"user","localhost",[]}|owner]],
                                       [],[],[],[],[],[],[],[],[],[],[],[],[],
                                       [],[]}}},
                                    {lqueue,{[],[]},0,20},
                                    [],[],false,nil,none,
                                    {[],[]}}]},
                                 {mod_muc_log,get_room_info,2},
                                 {mod_muc_log,add_message_to_log,5},
                                 {mod_muc_log,handle_cast,2},
                                 {gen_server,handle_msg,5},
                                 {proc_lib,init_p_do_apply,3}]}
@cstar
Copy link
Owner

cstar commented Sep 16, 2010

Hi Aaron,

Thank you for you feedback.
Yes, modular_muc is unfortunately not compatible with mod_muc_log.

The code is a bit abandoned, but you can find a more recent version here :
http://github.com/cstar/ejabberd/tree/cloud/src/mod_muc/

It is still not compatible with modular_muc, but the code is better !

@aaronbrashears
Copy link
Author

Ok, good to know this is a known incompatibility. I had figured the mod_muc_log bundled with modular_muc would pick up the new log parameters that appear to be used.

@cstar
Copy link
Owner

cstar commented Sep 27, 2010

Yeah, sorry about that. I had a plan to port it to modular_muc, but never got around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants