hi, in ejabberd 16.02 when I using *assume_mam_usage: if_enabled* for mam
config it returns this error
mod_mam:
assume_mam_usage: if_enabled
default: always
cache_size: 100000
cache_life_time: 3600
2016-06-12 11:58:51.539 [error] <0.20724.1>< at >ejabberd_hooks:run_fold1:368
{{case_clause,{archive_prefs,{<<"user1">>,<<"domain.com
">>},always,[],[]}},[{mod_mam,message_is_archived,5,[{file,"src/mod_mam.erl"},{line,354}]},{ejabberd_hooks,safe_apply,3,[{file,"src/ejabberd_hooks.erl"},{line,382}]},{ejabberd_hooks,run_fold1,4,[{file,"src/ejabberd_hooks.erl"},{line,365}]},{ejabberd_c2s,'-handle_unacked_stanzas/1-fun-6-',8,[{file,"src/ejabberd_c2s.erl"},{line,2918}]},{lists,foreach,2,[{file,"lists.erl"},{line,1336}]},{ejabberd_c2s,terminate,3,[{file,"src/ejabberd_c2s.erl"},{line,1803}]},{p1_fsm,terminate,8,[{file,"src/p1_fsm.erl"},{line,740}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
running hook:
{message_is_archived,[{state,{socket_state,ezlib,{zlibsock,fast_tls,{tlssock,#Port<0.47476>,#Port<0.47495>},#Port<0.47539>},<0.20723.1>},ejabberd_socket,#Ref<0.0.4.219723>,false,<<"17644652947291914606">>,undefined,c2s,c2s_shaper,true,true,false,true,[verify_none,compression_none,{protocol_options,<<"no_sslv3">>},{certfile,<<"/opt/ejabberd-16.02/conf/server.pem">>}],true,{jid,<<"user">>,<<"
domain.com">>,<<"Android_bc7104214a409f89">>,<<"user">>,<<"domain.com
">>,<<"Android_bc7104214a409f89">>},<<"user">>,<<"domain.com
">>,<<"Android_bc7104214a409f89">>,{{1465,715862,453492},<0.20724.1>},{23,{{<<"user">>,<<"
domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"
domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user1">>,<<"
domain.com">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com
">>,<<>>},{{<<"user">>,<<"domain.com
">>,<<>>},nil,nil},nil}},{{<<"user">>,<<"domain.com
">>,<<>>},{{<<"user2">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com
">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"
domain.com">>,<<>>},nil,nil},nil}}},{{<<"user3">>,<<"domain.com
">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com
">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user">>,<<"
domain.com">>,<<>>},{{<<"user4">>,<<"domain.com
">>,<<>>},nil,nil},nil}},{{<<"user">>,<<"domain.com
">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com
">>,<<>>},nil,nil},nil},{{<<"user5">>,<<"domain.com
">>,<<>>},{{<<"user">>,<<"domain.com
">>,<<>>},nil,nil},nil}}}}},{41,{{<<"user">>,<<"domain.com
">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user6">>,<<"domain.com
">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com
">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user">>,<<"
domain.com">>,<<>>},{{<<"user7">>,<<"domain.com
">>,<<>>},nil,nil},nil}},{{<<"user">>,<<"domain.com
">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com
">>,<<>>},nil,nil},nil},{{<<"user8">>,<<"domain.com
">>,<<>>},nil,nil}}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"
domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user9">>,<<"
domain.com">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com
">>,<<>>},nil,nil}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"
domain.com">>,<<>>},{{<<"user10">>,<<"domain.com
">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com
">>,<<>>},nil,nil}}}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"
domain.com">>,<<>>},{{<<"user11">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"
domain.com">>,<<>>},{{<<"user">>,<<"domain.com
">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com
">>,<<>>},{{<<"user12">>,<<"domain.com
">>,<<>>},nil,nil},nil}},{{<<"user">>,<<"domain.com
">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com
">>,<<>>},nil,nil},nil},{{<<"user13">>,<<"domain.com
">>,<<>>},nil,nil}}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"
domain.com">>,<<>>},{{<<"user...">>,...},...},...},...}}}},...},...]}
_______________________________________________
ejabberd mailing list
ejabberd< at >jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Thank you for the response. It helps.
I investigated in detail and I have a reproducible as described below.
* ejabberd_c2s block is configured with resume_timeout: 2
* Stream Management is enabled but stream resumption is disabled from
client side.
** Two users - Sender and Receiver.*
**Receiver* loses connection and does not close the stream/tcp connection
properly.
* *Sender* sends a message to *Receiver* but gets 503/Service-Unavailable
* *Sender* retries sending failed message after 5 secs and sends
successfully.
++++++++++++++++++++++++++++++++++++++
Clients sent following request to server:
SEND: <enable xmlns="urn:xmpp:sm:3"/>
Clients received following acks from server.
RECV: <enabled xmlns="urn:xmpp:sm:3"/>
RECV: <enabled xmlns="urn:xmpp:sm:3"/>
++++++++++++++++++++++++++++++++++++++
*Relevant Server logs:*
--------------------------------------------------------------------------------
1) *ejabberd* tries to send message to *Receiver* who lost connection:
<<"<message from='*Sender*' to='*Receiver*' type='chat' id=''><body>I have
to go back</body><thread></thread><active xmlns='
http://jabber.org/protocol/chatstates'/></message>">>
--------------------------------------------------------------------------------
*Then some pubSub/multicast related packets*
016-06-11 20:03:53.698 [debug] <0.489.0>< at >shaper:update:120 State:
{maxrate,100000,129.30556943548794,1465675433614549}, Size=26
M=0.1300841029950614, I=83.597
2016-06-11 20:03:53.698 [debug] <0.490.0>< at >ejabberd_c2s:send_text:1823 Send
XML on stream = <<"<a xmlns='urn:xmpp:sm:3' h='26'/>">>
*2016-06-11 20:03:58.587 [info] <0.606.0>< at >ejabberd_c2s:terminate:1773
({socket_state,fast_tls,{tlssock,#Port<0.13962>,#Port<0.13963>},<0.605.0>})
Close session for Receiver*
2016-06-11 20:03:58.587 [debug] <0.606.0>< at >mod_pubsub:node_action:4186
node_action <<"pubsub.com">> <<"flat">> get_entity_affiliations [<<"pubsub.
* Receiver*">>,{*Receiver*}]
2016-06-11 20:03:58.587 [debug] <0.606.0>< at >mod_pubsub:node_call:4167
node_call <<"flat">> get_entity_affiliations [<<"pubsub.com>>,{*Receiver*}]
2016-06-11 20:03:58.587 [debug] <0.606.0>< at >mod_pubsub:node_action:4186
node_action <<"pubsub.com">> <<"hometree">> get_entity_affiliations [<<"
pubsub.com">>,{*Receiver*}]
2016-06-11 20:03:58.587 [debug] <0.606.0>< at >mod_pubsub:node_call:4167
node_call <<"hometree">> get_entity_affiliations [<<"pubsub.com">>,{
*Receiver*}]
2016-06-11 20:03:58.587 [debug] <0.606.0>< at >mod_pubsub:node_action:4186
node_action <<"pubsub.com">> <<"pep">> get_entity_affiliations [<<"
pubsub.com">>,{*Receiver*}]
2016-06-11 20:03:58.588 [debug] <0.606.0>< at >mod_pubsub:node_call:4167
node_call <<"pep">> get_entity_affiliations [<<"pubsub.com">>,{*Receiver*}]
--------------------------------------------------------------------------------
*Presence related packets*
2016-06-11 20:03:58.588 [debug] <0.606.0>< at >mod_carboncopy:disable:249
disabling for *Receiver*
2016-06-11 20:03:58.588 [debug]
<0.606.0>< at >mod_shared_roster:unset_presence:1099 unset_presence for
*Receiver* -> <<>> (0 resources)
2016-06-11 20:03:58.588 [debug]
<0.606.0>< at >ejabberd_router_multicast:do_route:211 route_multicast
from *Receiver*
domain dev.com
destinations [*Receiver*,*Sender*,User4,User3]
packet {xmlel,<<"presence">>,[{<<"type">>,<<"unavailable">>}],[]}
--------------------------------------------------------------------------------
*2016-06-11 20:03:58.588 [info]
<0.606.0>< at >ejabberd_c2s:handle_unacked_stanzas:2849 1 stanzas were not
acknowledged by **Receiver*
2016-06-11 20:03:58.588 [debug] <0.407.0>< at >ejabberd_router:do_route:351 route
from {*Receiver*}
to {*Receiver*}
packet {xmlel,<<"presence">>,[{<<"type">>,<<"unavailable">>}],[]}
--------------------------------------------------------------------------------
*Finally the error message 503/service-unavailable*
2016-06-11 20:03:58.589 [debug] <0.606.0>< at >ejabberd_router:do_route:351 route
from {*Receiver*}
to {*Sender*}
packet {xmlel,<<"message">>,[{<<"type">>,<<"error">>},{"to">>,
* Sender*},{<<"from">>,*
Receiver*},{<<"id">>,<<"">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"I
have to go
back">>}]},{xmlel,<<"thread">>,[],[{xmlcdata,<<"">>}]},{xmlel,<<"active">>,[{<<"xmlns">>,<<"
http://jabber.org/protocol/chatstates
">>}],[]},{xmlel,<<"error">>,[{<<"code">>,<<"503">>},{<<"type">>,<<"cancel">>}],[{xmlel,<<"service-unavailable">>,[{<<"xmlns">>,<<"urn:ietf:params:xml:ns:xmpp-stanzas">>}],[]}]}]}
On Sat, Jun 11, 2016 at 7:50 AM, Holger Weiß <holger< at >zedat.fu-berlin.de>
wrote:
_______________________________________________
ejabberd mailing list
ejabberd< at >jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd