Xmpp

ejabberd mod_logxml 崩潰 user_send_packet 和 user_recieve_packet

  • November 13, 2019

我使用 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 切換到 O​​penfire,並且這個過程非常順利,對於將來發現這個問題的任何人來說都是如此。

與 git/svn/compile 方法 ejabberd 相比,Openfire 允許我進行相對快速且指導良好的安裝過程,而且安裝外掛非常簡單(添加 .jar 並從管理界面,只需點擊“添加”按鈕即可)需要。我找到了一個監控外掛,添加了它,它立即開始記錄。

感謝你的寶貴時間。

引用自:https://serverfault.com/questions/991690