0

I installed mod_logxml using ejabberdctl module_install and moved the beam file to my /ebin. I troubleshot this method because it doesn't work correctly out of the box until now, I'm finally able to get the ejabberd server running at all with the module installed. My network people are interested in a company-wide XMPP server but want it to be logged.

This is what's happening now. Any advice?

2019-11-13 08:45:06.968 [error] <0.2343.0>@ejabberd_hooks:safe_apply:240 Hook user_send_packet crashed when running mod_logxml:send_packet/1:
** exception error: bad argument
   in function  mod_logxml:send_packet/1 (c:/ProgramData/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_logxml/src/mod_logxml.erl, line 174)
   in call from ejabberd_hooks:safe_apply/4 (src/ejabberd_hooks.erl, line 236)
   in call from ejabberd_hooks:run_fold1/4 (src/ejabberd_hooks.erl, line 217)
   in call from ejabberd_c2s:handle_authenticated_packet/2 (src/ejabberd_c2s.erl, line 486)
   in call from xmpp_stream_in:process_authenticated_packet/2 (src/xmpp_stream_in.erl, line 697)
   in call from xmpp_stream_in:handle_info/2 (src/xmpp_stream_in.erl, line 392)
   in call from p1_server:handle_msg/8 (src/p1_server.erl, line 696)
   in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 249)
** Arg 1 = {{iq,<<"purple58ee8559">>,get,<<"en">>,{jid,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>},{jid,<<"patrick">>,<<"qa2">>,<<>>,<<"patrick">>,<<"qa2">>,<<>>},[{xmlel,<<"ping">>,[{<<"xmlns">>,<<"urn:xmpp:ping">>}],[]}],#{ip => {192,168,12,26}}},#{resource => <<"120713539125646039411858">>,csi_state => active,stream_restarted => true,pres_last => {presence,<<>>,available,<<"en">>,{jid,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>},{jid,<<"patrick">>,<<"qa2">>,<<>>,<<"patrick">>,<<"qa2">>,<<>>},undefined,[],1,[{xmlel,<<"c">>,[{<<"xmlns">>,<<"http://jabber.org/protocol/caps">>},{<<"node">>,<<"http://pidgin.im/">>},{<<"hash">>,<<"sha-1">>},{<<"ver">>,<<"I22W7CegORwdbnu0ZiQwGpxr0Go=">>}],[]},{xmlel,<<"x">>,[{<<"xmlns">>,<<"vcard-temp:x:update">>}],[{xmlel,<<"photo">>,[],[]}]}],#{ip => {192,168,12,26}}},mod => ejabberd_c2s,zlib => false,stream_authenticated => true,conn => c2s_tls,stream_version => {1,0},stream_timeout => infinity,lang => <<"en">>,jid => {jid,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>},caps_resources => {1,{{<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>},{caps,<<"http://pidgin.im/">>,<<"I22W7CegORwdbnu0ZiQwGpxr0Go=">>,<<"sha-1">>,[]},nil,nil}},mgmt_max_timeout => 300000,lserver => <<"qa2">>,tls_options => [compression_none],codec_options => [ignore_els],mgmt_ack_timeout => 60000,socket => {socket_state,fast_tls,{tlssock,#Port<0.24>,#Ref<0.2914831290.2631532545.69447>},262144,#Ref<0.2914831290.2631532545.69440>,{state,1000,1000,1000,1573656306954814},none},mgmt_stanzas_out => 0,stream_compressed => false,pres_timestamp => {1573,655834,966529},stream_header_sent => true,csi_queue => {0,#{}},pres_a => {0,nil},server => <<"qa2">>,mgmt_timeout => 300000,owner => <0.2343.0>,socket_monitor => #Ref<0.2914831290.2631401473.69441>,access => c2s,tls_verify => false,sid => {{1573,653486,3},<0.2343.0>},user => <<"patrick">>,stream_encrypted => true,mgmt_state => inactive,shaper => c2s_shaper,mgmt_max_queue => 5000,xmlns => <<"jabber:client">>,tls_required => true,ip => {{192,168,12,26},50816},stream_state => established,mgmt_stanzas_in => 0,tls_enabled => false,mgmt_resend => if_offline,stream_direction => in,mgmt_queue_type => ram,stream_id => <<"17910670953635984133">>,mgmt_stanzas_req => 0,auth_module => ejabberd_auth_mnesia}}
2019-11-13 08:45:06.968 [error] <0.2343.0>@ejabberd_hooks:safe_apply:240 Hook user_receive_packet crashed when running mod_logxml:receive_packet/1:
** exception error: bad argument
   in function  mod_logxml:receive_packet/1 (c:/ProgramData/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_logxml/src/mod_logxml.erl, line 181)
   in call from ejabberd_hooks:safe_apply/4 (src/ejabberd_hooks.erl, line 236)
   in call from ejabberd_hooks:run_fold1/4 (src/ejabberd_hooks.erl, line 217)
   in call from ejabberd_c2s:process_info/2 (src/ejabberd_c2s.erl, line 230)
   in call from ejabberd_hooks:safe_apply/4 (src/ejabberd_hooks.erl, line 236)
   in call from ejabberd_hooks:run_fold1/4 (src/ejabberd_hooks.erl, line 217)
   in call from xmpp_stream_in:handle_info/2 (src/xmpp_stream_in.erl, line 436)
   in call from p1_server:handle_msg/8 (src/p1_server.erl, line 696)
** Arg 1 = {{iq,<<"purple58ee8559">>,result,<<"en">>,{jid,<<"patrick">>,<<"qa2">>,<<>>,<<"patrick">>,<<"qa2">>,<<>>},{jid,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>},[],#{ip => {192,168,12,26}}},#{resource => <<"120713539125646039411858">>,csi_state => active,stream_restarted => true,pres_last => {presence,<<>>,available,<<"en">>,{jid,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>},{jid,<<"patrick">>,<<"qa2">>,<<>>,<<"patrick">>,<<"qa2">>,<<>>},undefined,[],1,[{xmlel,<<"c">>,[{<<"xmlns">>,<<"http://jabber.org/protocol/caps">>},{<<"node">>,<<"http://pidgin.im/">>},{<<"hash">>,<<"sha-1">>},{<<"ver">>,<<"I22W7CegORwdbnu0ZiQwGpxr0Go=">>}],[]},{xmlel,<<"x">>,[{<<"xmlns">>,<<"vcard-temp:x:update">>}],[{xmlel,<<"photo">>,[],[]}]}],#{ip => {192,168,12,26}}},mod => ejabberd_c2s,zlib => false,stream_authenticated => true,conn => c2s_tls,stream_version => {1,0},stream_timeout => infinity,lang => <<"en">>,jid => {jid,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>,<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>},caps_resources => {1,{{<<"patrick">>,<<"qa2">>,<<"120713539125646039411858">>},{caps,<<"http://pidgin.im/">>,<<"I22W7CegORwdbnu0ZiQwGpxr0Go=">>,<<"sha-1">>,[]},nil,nil}},mgmt_max_timeout => 300000,lserver => <<"qa2">>,tls_options => [compression_none],codec_options => [ignore_els],mgmt_ack_timeout => 60000,socket => {socket_state,fast_tls,{tlssock,#Port<0.24>,#Ref<0.2914831290.2631532545.69447>},262144,#Ref<0.2914831290.2631532545.69440>,{state,1000,1000,1000,1573656306954814},none},mgmt_stanzas_out => 0,stream_compressed => false,pres_timestamp => {1573,655834,966529},stream_header_sent => true,csi_queue => {0,#{}},pres_a => {0,nil},server => <<"qa2">>,mgmt_timeout => 300000,owner => <0.2343.0>,socket_monitor => #Ref<0.2914831290.2631401473.69441>,access => c2s,tls_verify => false,sid => {{1573,653486,3},<0.2343.0>},user => <<"patrick">>,stream_encrypted => true,mgmt_state => inactive,shaper => c2s_shaper,mgmt_max_queue => 5000,xmlns => <<"jabber:client">>,tls_required => true,ip => {{192,168,12,26},50816},stream_state => established,mgmt_stanzas_in => 0,tls_enabled => false,mgmt_resend => if_offline,stream_direction => in,mgmt_queue_type => ram,stream_id => <<"17910670953635984133">>,mgmt_stanzas_req => 0,auth_module => ejabberd_auth_mnesia}}
Patrick
  • 1
  • 1

1 Answers1

0

I don't see a way to close topics here so I'm just going to answer myself - I have switched from ejabberd to Openfire and the process was quite smooth, for anyone finding this in the future.

Openfire allowed me a relatively quick and well-guided install process plus installing plugins is extraordinarily simple (adding a .jar and from the admin interface, clicking an "add" button is all it took) compared to the git/svn/compile method ejabberd needs. I found a monitoring plugin, added it, and it started logging immediately.

Thanks again for your time.

Patrick
  • 1
  • 1