Project

General

Profile

Client is disconnected event/stanza

Roman Hrytsiv
Added 2 months ago

Hello,

I try to find a solution to identify when a client was disconnected.

In debug mode I see commands STREAM_FINISHED and STREAM_CLOSED:

2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Processing packet: from=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, to=sess-man@dd6ac6c44c2a, DATA=<iq to="sess-man@dd6ac6c44c2a" type="set" from="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" id="8c4a1ac5-55e9-4c09-8fe2-24d6ab0ee3b1"><command xmlns="http://jabber.org/protocol/commands" node="STREAM_FINISHED"/></iq>, SIZE=223, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set
2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Called for : sess-man@dd6ac6c44c2a
2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Called for : sess-man@dd6ac6c44c2a
2018-09-07 11:01:14.804 [in_40-sess-man] TRACE tigase.server.xmppsession.SessionManager - Received packet: from=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, to=sess-man@dd6ac6c44c2a, DATA=<iq to="sess-man@dd6ac6c44c2a" from="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" type="set" delay="120" retryCount="15" id="4cd49349-687f-4648-b4f2-e8d03c13710b"><command xmlns="http://jabber.org/protocol/commands" node="STREAM_CLOSED"><x xmlns="jabber:x:data" type="submit"><field var="user-jid"><value>CData size: 41</value></field></x></command></iq>, SIZE=387, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2018-09-07 11:01:14.804 [in_40-sess-man] DEBUG tigase.server.xmppsession.SessionManager - STREAM_CLOSED command from: c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742
2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - 1. Packet will be processed by: sess-man@dd6ac6c44c2a, from=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, to=sess-man@dd6ac6c44c2a, DATA=<iq to="sess-man@dd6ac6c44c2a" type="set" from="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" id="8c4a1ac5-55e9-4c09-8fe2-24d6ab0ee3b1"><command xmlns="http://jabber.org/protocol/commands" node="STREAM_FINISHED"/></iq>, SIZE=223, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set
2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Processing packet: from=sess-man@dd6ac6c44c2a, to=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, DATA=<iq to="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" type="result" from="sess-man@dd6ac6c44c2a" id="4cd49349-687f-4648-b4f2-e8d03c13710b"/>, SIZE=145, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=result
2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Called for : c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742
2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - No componentID matches (fast lookup against exact address): c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, for map: [c2s@dd6ac6c44c2a, department@dd6ac6c44c2a, amp@dd6ac6c44c2a, monitor@dd6ac6c44c2a, bosh@dd6ac6c44c2a, s2s@dd6ac6c44c2a, vhost-man@dd6ac6c44c2a, basic-conf@dd6ac6c44c2a, cluster-response-manager@dd6ac6c44c2a, stats@dd6ac6c44c2a, eventbus@dd6ac6c44c2a, ws2s@dd6ac6c44c2a, sess-man@dd6ac6c44c2a, muc@dd6ac6c44c2a, usermanager@dd6ac6c44c2a]; trying VHost lookup
2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Called for : c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742
2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - No componentID matches (fast lookup against exact address): c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, for map: [c2s@dd6ac6c44c2a, department@dd6ac6c44c2a, amp@dd6ac6c44c2a, monitor@dd6ac6c44c2a, bosh@dd6ac6c44c2a, s2s@dd6ac6c44c2a, vhost-man@dd6ac6c44c2a, basic-conf@dd6ac6c44c2a, cluster-response-manager@dd6ac6c44c2a, stats@dd6ac6c44c2a, eventbus@dd6ac6c44c2a, ws2s@dd6ac6c44c2a, sess-man@dd6ac6c44c2a, muc@dd6ac6c44c2a, usermanager@dd6ac6c44c2a]; trying VHost lookup
2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - 1. Packet will be processed by: c2s@dd6ac6c44c2a, from=sess-man@dd6ac6c44c2a, to=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, DATA=<iq to="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" type="result" from="sess-man@dd6ac6c44c2a" id="4cd49349-687f-4648-b4f2-e8d03c13710b"/>, SIZE=145, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=result
2018-09-07 11:01:14.805 [in_40-sess-man] TRACE tigase.server.xmppsession.SessionManager - Received packet: from=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, to=sess-man@dd6ac6c44c2a, DATA=<iq to="sess-man@dd6ac6c44c2a" type="set" from="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" id="8c4a1ac5-55e9-4c09-8fe2-24d6ab0ee3b1"><command xmlns="http://jabber.org/protocol/commands" node="STREAM_FINISHED"/></iq>, SIZE=223, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set

But I don't understand how I can to receive this command or there is another way to identify a closing of connection with the client.