Project

General

Profile

Error resuming sessions with StreamManagement

Mauro Carrio
Added about 5 years ago

Hi,

I'm getting a NullPointerException when a client tries to resume a session using XEP 0198.

I'm simulating that client looses connection with the server switching off the wifi network, and then switching on to reconnect.

There the client send resume message with the prev id given before by the server.

Tigase raises an error on this line in SessionManager.java:

        case STREAM_MOVED:
            if (connection != null) {
                String oldConnectionJidStr = Command.getFieldValue(pc, "old-connjid");
                JID oldConnJid = JID.jidInstanceNS(oldConnectionJidStr);

                try {
                    // get old session and replace it's connection id to redirect packets
                    // to new connection
                    XMPPResourceConnection oldConn = connectionsByFrom.remove(oldConnJid);
                    oldConn.setConnectionId(connection.getConnectionId());

The variable oldConn is null. The problem is that the client becomes into a rare state where it can send stanzas but does not receive anything from the server.

I'm using tigase-server-5.2.0-RC1.

Thanks in advance,

Mauro


Replies (11)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 5 years ago

Hi,

Do you get this error every time you try to reconnect?

Could you attach a log of Tigase XMPP Server with enabled debugging when this issue appears, so we could check what could cause this issue?

Added by Mauro Carrio about 5 years ago

Yes, every time the client tries to resume.

This is the error en tigase-console log:

2014-01-13 11:28:33.670 [in_3-sess-man]    AbstractMessageReceiver$QueueListener.run()  SEVERE: [in_3-sess-man] Exception during packet processing: from=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776, to=sess-man@aronda-lx-xps, DATA=<iq from="c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776" id="moved" to="sess-man@aronda-lx-xps" type="set"><command node="STREAM_MOVED" xmlns="http://jabber.org/protocol/commands"><x xmlns="jabber:x:data" type="submit"><field var="old-conn-jid"><value>c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968</value></field></x></command></iq>, SIZE=354, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set
java.lang.NullPointerException
    at tigase.server.xmppsession.SessionManager.processCommand(SessionManager.java:1725)
    at tigase.server.xmppsession.SessionManager.processPacket(SessionManager.java:516)
    at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1475)

Log at the error moment with property debug=server,xmpp.impl:

2014-01-13 11:28:33.659 [in_2-message-router]  MessageRouter.processPacket()  FINEST:   1. Packet will be processed by: c2s@aronda-lx-xps, from=sess-man@aronda-lx-xps, to=null, DATA=<iq from="sess-man@aronda-lx-xps" id="tig2" to="c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776" type="set"><command node="USER_LOGIN" xmlns="http://jabber.org/protocol/commands"><x xmlns="jabber:x:data" type="submit"><field var="user-jid"><value>5553014411@mydomain.com/android</value></field></x></command></iq>, SIZE=320, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2014-01-13 11:28:33.660 [in_3-c2s]         ClientConnectionManager.processPacket()  FINEST: Processing packet: from=sess-man@aronda-lx-xps, to=null, DATA=<iq from="sess-man@aronda-lx-xps" id="tig2" to="c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776" type="set"><command node="USER_LOGIN" xmlns="http://jabber.org/protocol/commands"><x xmlns="jabber:x:data" type="submit"><field var="user-jid"><value>CData size: 29</value></field></x></command></iq>, SIZE=320, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set
2014-01-13 11:28:33.663 [in_3-message-router]  MessageRouter.processPacket()  FINEST:   Processing packet: from=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776, to=sess-man@aronda-lx-xps, DATA=<iq from="c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776" id="moved" to="sess-man@aronda-lx-xps" type="set"><command node="STREAM_MOVED" xmlns="http://jabber.org/protocol/commands"><x xmlns="jabber:x:data" type="submit"><field var="old-conn-jid"><value>c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968</value></field></x></command></iq>, SIZE=354, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set
2014-01-13 11:28:33.664 [pool-10-thread-2]  ClientConnectionManager.processSocketData()  FINEST: Processing socket data: from=null, to=null, DATA=<iq from="5553014411@mydomain.com/android" type="get" id="Ab84m-13"><query xmlns="jabber:iq:privacy"/></iq>, SIZE=105, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=get from connection: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776
2014-01-13 11:28:33.665 [pool-10-thread-2]  ClientConnectionManager.processSocketData()  FINEST: XMLNS set for packet: from=null, to=null, DATA=<iq from="5553014411@mydomain.com/android" xmlns="jabber:client" type="get" id="Ab84m-13"><query xmlns="jabber:iq:privacy"/></iq>, SIZE=127, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=get from connection: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776
2014-01-13 11:28:33.663 [in_7-message-router]  MessageRouter.processPacket()  FINEST:   Processing packet: from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="34"><body>lalalala</body><thread>AMwTusYNZylFxBPpXzObiHXaQqosNWsS</thread></message>, SIZE=193, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.666 [in_7-message-router]  MessageRouter.getLocalComponent()  FINEST: Called for : c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968
2014-01-13 11:28:33.666 [in_7-message-router]  MessageRouter.getLocalComponent()  FINEST: None compId matches: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, for map: {stats@aronda-lx-xps=tigase.stats.StatisticsCollector@89dea3, s2s@aronda-lx-xps=tigase.server.xmppserver.S2SConnectionManager@1975e4d, amp@aronda-lx-xps=tigase.server.amp.AmpComponent@93a0d7, ws2s@aronda-lx-xps=tigase.server.websocket.WebSocketClientConnectionManager@42876b, vhost-man@aronda-lx-xps=tigase.vhosts.VHostManager@510b13, c2s@aronda-lx-xps=tigase.server.xmppclient.ClientConnectionManager@5bce28, monitor@aronda-lx-xps=tigase.server.monitor.MonitorComponent@45b199, sess-man@aronda-lx-xps=tigase.server.xmppsession.SessionManager@db177d, basic-conf@aronda-lx-xps=tigase.conf.Configurator@cf187e, bosh@aronda-lx-xps=tigase.server.bosh.BoshConnectionManager@eeef95}
2014-01-13 11:28:33.667 [in_7-message-router]  MessageRouter.processPacket()  FINEST:   1. Packet will be processed by: c2s@aronda-lx-xps, from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="34"><body>lalalala</body><thread>AMwTusYNZylFxBPpXzObiHXaQqosNWsS</thread></message>, SIZE=193, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.667 [in_7-message-router]  MessageRouter.processPacket()  FINEST:   Processing packet: from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="35"><body>iuiuiu</body><thread>AMwTusYNZylFxBPpXzObiHXaQqosNWsS</thread></message>, SIZE=191, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.667 [in_7-c2s]         ClientConnectionManager.processPacket()  FINEST: Processing packet: from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="34"><body>CData size: 8</body><thread>CData size: 32</thread></message>, SIZE=193, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.667 [in_7-c2s]         ConnectionManager.writePacketToSocket()  FINEST: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, type: accept, Socket: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968 Socket[unconnected], jid: 5553014411@mydomain.com/android, Writing packet: from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="34"><body>lalalala</body><thread>AMwTusYNZylFxBPpXzObiHXaQqosNWsS</thread></message>, SIZE=193, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.667 [in_7-message-router]  MessageRouter.getLocalComponent()  FINEST: Called for : c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968
2014-01-13 11:28:33.668 [in_7-message-router]  MessageRouter.getLocalComponent()  FINEST: None compId matches: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, for map: {stats@aronda-lx-xps=tigase.stats.StatisticsCollector@89dea3, s2s@aronda-lx-xps=tigase.server.xmppserver.S2SConnectionManager@1975e4d, amp@aronda-lx-xps=tigase.server.amp.AmpComponent@93a0d7, ws2s@aronda-lx-xps=tigase.server.websocket.WebSocketClientConnectionManager@42876b, vhost-man@aronda-lx-xps=tigase.vhosts.VHostManager@510b13, c2s@aronda-lx-xps=tigase.server.xmppclient.ClientConnectionManager@5bce28, monitor@aronda-lx-xps=tigase.server.monitor.MonitorComponent@45b199, sess-man@aronda-lx-xps=tigase.server.xmppsession.SessionManager@db177d, basic-conf@aronda-lx-xps=tigase.conf.Configurator@cf187e, bosh@aronda-lx-xps=tigase.server.bosh.BoshConnectionManager@eeef95}
2014-01-13 11:28:33.668 [in_7-message-router]  MessageRouter.processPacket()  FINEST:   1. Packet will be processed by: c2s@aronda-lx-xps, from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="35"><body>iuiuiu</body><thread>AMwTusYNZylFxBPpXzObiHXaQqosNWsS</thread></message>, SIZE=191, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.668 [in_7-message-router]  MessageRouter.processPacket()  FINEST:   Processing packet: from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="36"><body>iiii</body><thread>AMwTusYNZylFxBPpXzObiHXaQqosNWsS</thread></message>, SIZE=189, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.668 [in_7-message-router]  MessageRouter.getLocalComponent()  FINEST: Called for : c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968
2014-01-13 11:28:33.668 [in_7-message-router]  MessageRouter.getLocalComponent()  FINEST: None compId matches: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, for map: {stats@aronda-lx-xps=tigase.stats.StatisticsCollector@89dea3, s2s@aronda-lx-xps=tigase.server.xmppserver.S2SConnectionManager@1975e4d, amp@aronda-lx-xps=tigase.server.amp.AmpComponent@93a0d7, ws2s@aronda-lx-xps=tigase.server.websocket.WebSocketClientConnectionManager@42876b, vhost-man@aronda-lx-xps=tigase.vhosts.VHostManager@510b13, c2s@aronda-lx-xps=tigase.server.xmppclient.ClientConnectionManager@5bce28, monitor@aronda-lx-xps=tigase.server.monitor.MonitorComponent@45b199, sess-man@aronda-lx-xps=tigase.server.xmppsession.SessionManager@db177d, basic-conf@aronda-lx-xps=tigase.conf.Configurator@cf187e, bosh@aronda-lx-xps=tigase.server.bosh.BoshConnectionManager@eeef95}
2014-01-13 11:28:33.668 [in_7-message-router]  MessageRouter.processPacket()  FINEST:   1. Packet will be processed by: c2s@aronda-lx-xps, from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="36"><body>iiii</body><thread>AMwTusYNZylFxBPpXzObiHXaQqosNWsS</thread></message>, SIZE=189, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.668 [in_3-message-router]  MessageRouter.getLocalComponent()  FINEST: Called for : sess-man@aronda-lx-xps
2014-01-13 11:28:33.668 [in_3-message-router]  MessageRouter.processPacket()  FINEST:   1. Packet will be processed by: sess-man@aronda-lx-xps, from=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776, to=sess-man@aronda-lx-xps, DATA=<iq from="c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776" id="moved" to="sess-man@aronda-lx-xps" type="set"><command node="STREAM_MOVED" xmlns="http://jabber.org/protocol/commands"><x xmlns="jabber:x:data" type="submit"><field var="old-conn-jid"><value>c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968</value></field></x></command></iq>, SIZE=354, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set
2014-01-13 11:28:33.668 [in_7-message-router]  MessageRouter.processPacket()  FINEST:   Processing packet: from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="37"><body>uuu</body><thread>AMwTusYNZylFxBPpXzObiHXaQqosNWsS</thread></message>, SIZE=188, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.669 [in_7-message-router]  MessageRouter.getLocalComponent()  FINEST: Called for : c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968
2014-01-13 11:28:33.668 [in_7-c2s]         ClientConnectionManager.processPacket()  FINEST: Processing packet: from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="35"><body>CData size: 6</body><thread>CData size: 32</thread></message>, SIZE=191, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.669 [in_3-sess-man]    SessionManager.processPacket()     FINEST:   Received packet: from=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776, to=sess-man@aronda-lx-xps, DATA=<iq from="c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776" id="moved" to="sess-man@aronda-lx-xps" type="set"><command node="STREAM_MOVED" xmlns="http://jabber.org/protocol/commands"><x xmlns="jabber:x:data" type="submit"><field var="old-conn-jid"><value>CData size: 56</value></field></x></command></iq>, SIZE=354, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set
2014-01-13 11:28:33.669 [in_3-message-router]  MessageRouter.processPacket()  FINEST:   Processing packet: from=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776, to=sess-man@aronda-lx-xps, DATA=<iq from="5553014411@mydomain.com/android" xmlns="jabber:client" type="get" id="Ab84m-13"><query xmlns="jabber:iq:privacy"/></iq>, SIZE=127, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=get
2014-01-13 11:28:33.669 [in_7-message-router]  MessageRouter.getLocalComponent()  FINEST: None compId matches: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, for map: {stats@aronda-lx-xps=tigase.stats.StatisticsCollector@89dea3, s2s@aronda-lx-xps=tigase.server.xmppserver.S2SConnectionManager@1975e4d, amp@aronda-lx-xps=tigase.server.amp.AmpComponent@93a0d7, ws2s@aronda-lx-xps=tigase.server.websocket.WebSocketClientConnectionManager@42876b, vhost-man@aronda-lx-xps=tigase.vhosts.VHostManager@510b13, c2s@aronda-lx-xps=tigase.server.xmppclient.ClientConnectionManager@5bce28, monitor@aronda-lx-xps=tigase.server.monitor.MonitorComponent@45b199, sess-man@aronda-lx-xps=tigase.server.xmppsession.SessionManager@db177d, basic-conf@aronda-lx-xps=tigase.conf.Configurator@cf187e, bosh@aronda-lx-xps=tigase.server.bosh.BoshConnectionManager@eeef95}
2014-01-13 11:28:33.669 [in_7-message-router]  MessageRouter.processPacket()  FINEST:   1. Packet will be processed by: c2s@aronda-lx-xps, from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="37"><body>uuu</body><thread>AMwTusYNZylFxBPpXzObiHXaQqosNWsS</thread></message>, SIZE=188, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.669 [in_7-c2s]         ConnectionManager.writePacketToSocket()  FINEST: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, type: accept, Socket: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968 Socket[unconnected], jid: 5553014411@mydomain.com/android, Writing packet: from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="35"><body>iuiuiu</body><thread>AMwTusYNZylFxBPpXzObiHXaQqosNWsS</thread></message>, SIZE=191, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.669 [in_3-sess-man]    SessionManager.processCommand()    FINER:    STREAM_MOVED command from: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776
2014-01-13 11:28:33.670 [in_7-c2s]         ClientConnectionManager.processPacket()  FINEST: Processing packet: from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="36"><body>CData size: 4</body><thread>CData size: 32</thread></message>, SIZE=189, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.670 [in_7-c2s]         ConnectionManager.writePacketToSocket()  FINEST: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, type: accept, Socket: c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968 Socket[unconnected], jid: 5553014411@mydomain.com/android, Writing packet: from=sess-man@aronda-lx-xps, to=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968, DATA=<message from="5553015452@mydomain.com/Gajim" xmlns="jabber:client" to="5553014411@mydomain.com" type="chat" id="36"><body>iiii</body><thread>AMwTusYNZylFxBPpXzObiHXaQqosNWsS</thread></message>, SIZE=189, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=chat
2014-01-13 11:28:33.669 [in_3-message-router]  MessageRouter.getLocalComponent()  FINEST: Called for : sess-man@aronda-lx-xps
2014-01-13 11:28:33.670 [in_3-sess-man]    AbstractMessageReceiver$QueueListener.run()  SEVERE: [in_3-sess-man] Exception during packet processing: from=c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776, to=sess-man@aronda-lx-xps, DATA=<iq from="c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_55776" id="moved" to="sess-man@aronda-lx-xps" type="set"><command node="STREAM_MOVED" xmlns="http://jabber.org/protocol/commands"><x xmlns="jabber:x:data" type="submit"><field var="old-conn-jid"><value>c2s@aronda-lx-xps/192.168.1.200_5222_192.168.1.109_56968</value></field></x></command></iq>, SIZE=354, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set
java.lang.NullPointerException
    at tigase.server.xmppsession.SessionManager.processCommand(SessionManager.java:1725)
    at tigase.server.xmppsession.SessionManager.processPacket(SessionManager.java:516)
    at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1475)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 5 years ago

Do you use any publicly available client to make this test?

I'm asking as from what I see in log, this client tries to resume stream, while it already binded resource to it's connection. Stream should be resumed after authentication but instead of resource binding.

If this client is publicly available, I would like to download it to be able to test it using my own enviroment to get full log.

If you will still have this issue using fixed version of a client, please add an issue pointing to this topic with attached full log of Tigase XMPP Server with debuging turned on.

I will work on a fix for Tigase XMPP Server to protect against stream resumption on stream with already binded resource.

Added by Mauro Carrio about 5 years ago

No, I'm using my own client on android platform.

You were right, now I changed my implementation in order to send the resume without authenticating and binding but the server didn't answer to my resume packet neither with resumed nor with an error packet. Im also trying to use a public client to do some test like psi+, gajim and swift that in their features support XEP-0198 but they don't activate the stream management. I'm using non-sasl plain authentication.

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 5 years ago

Your client needs to authenticate XMPP stream but you can not bind resource. I will check why you did not receive an error in this case.

Added by Mauro Carrio about 5 years ago

Ok, the XEP for me it's a bit confusing in the authentication part.

Do you know any desktop public client I can use to test this with Tigase Server? I need to ensure that this feature is working on Tigase to explain the mobile developers how to implement.

Thanks a lot for your help!

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 5 years ago

Unfortunately, I'm not aware of any public desktop client which has Stream Management implemented.

Added by Mauro Carrio about 5 years ago

Ok, but how do you do to test Stream Management on Tigase Server?

Which client with connection log enable can I use?

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

Eh, Andrzej forgot to mention we have something far better than "some public desktop client". We have our own Android client which is a "public client" and it is open source application. So you can not only test all the XMPP features but you can also see actual code. The client/library functionality fully matches the server capabilities, so everything what is supported by the server is also supported by the client. Well, almost everything, I would say everything what makes sense.

Here is a link to the Android client project page: https://projects.tigase.org/projects/tigase-mobilemessenger

Added by Mauro Carrio about 5 years ago

Hi Artur,

I installed and configure my android environment and could compile and run tigase mobile messenger.

I was testing a lot but I could not simulate resuming the session from the mobile app.

My test:

  • restarted network connection on the device

  • restarted network connection on the server

  • disconnect/connect from tigase mobile messenger

In all cases the client when reconnects enables a new session instead of resuming it (the reconnection always was before session timeout set). The only way the client execute a resume was restarting the tigase server, but the server of course at that moment has not the sessions information any more.

Do you have any thought about how to simulate and test this scenario?

Thanks!

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 5 years ago

Tigase Mobile Messenger will not try to resume in case of disconnect/connect from Tigase Mobile Messenger as such action is considered as intentional, so stream is properly closed and resumption is not possible.

Same thing is with restarting network connection on the device, as Tigase Mobile Messenger will discover such disconnection and will try to close it's stream and will reset stream resumption id - so resumption will not be possible.

I do not know how you restarted network connection on the server side, could you explain how you did this?

As I tested stream reconnection in Tigase Mobile Messenger, I disconnected cable between wifi access point and switch to which network server was connected, and then tried to send message from Tigase Mobile Messenger, which lead Tigase Mobile Messenger to discover this disconnection and try to use resumption. And then I quickly connected cable back to to wifi access point, which allowed Tigase Mobile Messenger to connect to server and correctly resume session. This test was only to validate that this feature works as proper tests of Stream Management resumption implementation were done using only Jaxmpp library with custom modification to ensure that this library will not close stream and not reset stream resumption id on manual disconnection.

    (1-11/11)