offline chat messages giving service-unavailable error when receiver comes online

我的未来我决定 提交于 2019-12-12 18:13:40

问题


I am getting following error message when recipient is offline and become online. I expect receiver to receive the offline message but it seems something is wrong.

2015-11-07 19:25:16.583 [debug] <0.748.0>@ejabberd_c2s:send_text:1892 Send XML on stream = <<"<message from='+999999@abc.example.com' to='+888888@abc.example.com/+888888' type='error' xml:lang='en' id='uGWtv-18'>
<body>gwtnwf </body><thread>608802ea-265e-4ec4-a39a-408fd75dc268</thread>
<x xmlns='jabber:x:oob'><file1url>1446904491592252000.jpeg</file1url><postuuid>8a660e7f-d0a1-4f0c-9c87-f8c4f30436a5</postuuid><from>+999999</from></x>
<error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></message>">>

below is ejabberd log before above error appears:

2015-11-07 19:38:49.480 [debug] <0.681.0>@ejabberd_c2s:send_text:1901 Send XML on stream = <<"<stream:features><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='5m6LdO+13BLJZeS37oD5PF54bGY='/><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/><sm xmlns='urn:xmpp:sm:2'/><sm xmlns='urn:xmpp:sm:3'/><csi xmlns='urn:xmpp:csi:0'/></stream:features>">>
2015-11-07 19:38:49.631 [debug] <0.680.0>@ejabberd_receiver:process_data:349 Received XML on stream = <<"<iq id='UPu2R-4' type='set'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>+888888</resource></bind></iq>">>
2015-11-07 19:38:49.631 [debug] <0.680.0>@shaper:update:120 State: {maxrate,1000,0.0,1446905329479460}, Size=121 M=60.5, I=152.0
2015-11-07 19:38:49.631 [debug] <0.681.0>@ejabberd_c2s:send_text:1901 Send XML on stream = <<"<iq id='UPu2R-4' type='result'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>+888888@abc.example.com/+888888</jid></bind></iq>">>
2015-11-07 19:38:49.651 [debug] <0.680.0>@ejabberd_receiver:process_data:349   Received XML on stream = <<"<iq id='UPu2R-6' type='set'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq>">> 
2015-11-07 19:38:49.651 [debug] <0.680.0>@shaper:update:120 State: {maxrate,1000,397.55813877078964,1446905329631639}, Size=87 M=54.29214132814999, I=19.649
2015-11-07 19:38:49.651 [info] <0.681.0>@ejabberd_c2s:wait_for_session:1120 ({socket_state,gen_tcp,#Port<0.7185>,<0.680.0>}) Opened session for +888888@abc.example.com/+888888
2015-11-07 19:38:49.651 [debug] <0.681.0>@ejabberd_c2s:send_text:1901 Send XML on stream = <<"<iq type='result' id='UPu2R-6'/>">>
2015-11-07 19:38:49.652 [debug] <0.666.0>@ejabberd_c2s:send_element:1905 Cannot send element while waiting for resumption: {xmlel,<<"stream:error">>,[],[{xmlel,<<"conflict">>,[{<<"xmlns">>,<<"urn:ietf:params:xml:ns:xmpp-streams">>}],[{xmlcdata,<<>>}]},{xmlel,<<"text">>,[{<<"xml:lang">>,<<"en">>},{<<"xmlns">>,<<"urn:ietf:params:xml:ns:xmpp-streams">>}],[{xmlcdata,<<"Replaced by new connection">>}]}]}
2015-11-07 19:38:49.652 [debug] <0.666.0>@ejabberd_c2s:send_trailer:1968 Cannot send stream trailer while waiting for resumption
2015-11-07 19:38:49.652 [info] <0.666.0>@ejabberd_c2s:terminate:1822 ({socket_state,gen_tcp,#Port<0.7173>,<0.665.0>}) Replaced session for +888888@abc.example.com/+888888
2015-11-07 19:38:49.653 [debug] <0.666.0>@mod_carboncopy:disable:249 disabling for <<"+888888">>
2015-11-07 19:38:49.653 [debug] <0.666.0>@mod_shared_roster:unset_presence:1104 unset_presence for <<"+888888">> @ <<"abc.example.com">> / <<"+888888">> -> <<"Replaced by new connection">> (1 resources)

below is my ejabberd config

max_user_offline_messages:
  admin: 5000
  all: 1000

this is how i connect using smack 4.1.2

connection = new XMPPTCPConnection(getConnectionConfiguration(userName,password));
connection.setUseStreamManagement(true);
connection.connect();
connection.login(userName, password);

来源:https://stackoverflow.com/questions/33583739/offline-chat-messages-giving-service-unavailable-error-when-receiver-comes-onlin

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!