我使用 ejabberdctl module_install 安装了 mod_logxml,并将梁文件移动到我的 /ebin。我对这种方法进行了故障排除,因为直到现在它无法正常工作,我终于能够在安装了模块的情况下让 ejabberd 服务器运行。我的网络人员对公司范围内的 XMPP 服务器感兴趣,但希望它被记录下来。
这就是现在正在发生的事情。有什么建议吗?
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}}
我看不到在这里关闭主题的方法,所以我只想回答自己——我已经从 ejabberd 切换到 Openfire,并且这个过程非常顺利,对于将来发现这个问题的任何人来说都是如此。
与 git/svn/compile 方法 ejabberd 相比,Openfire 允许我进行相对快速且指导良好的安装过程,而且安装插件非常简单(添加 .jar 并从管理界面,只需单击“添加”按钮即可)需要。我找到了一个监控插件,添加了它,它立即开始记录。
感谢你的宝贵时间。