Bug In Disconnection of Tigase bosh mode ?
Hi every body,
In my Tigase Beta 3 on Debian,
I have discover than when I disconnect a bosh client, I send a presence with the type at unavailable.
But the server answer a code 503...
and in the Tigase log I look that :
Message without TO attribute set, don't know what to do wih this:
from=bosh@******/87c317ab-0c5a-4e8d-8877-24b31b1e8ef0, to=sess-man@******,
DATA=<presence type="unavailable" xmlns="jabber:client"/>,
SIZE=52, XMLNS=jabber:client, PRIORITY=PRESENCE,
PERMISSION=NONE, TYPE=unavailableSincerely Toti,
There might be a period of time when the user session on SM gets out of sync with user's Bosh session. So the Bosh sends a packet to SM but there is no session for this connection. Therefore the SM cannot process the packet.
It is hard to say whether this is a bug or a normal situation without investigation and looking into logs on both the client and the server side.
I have that in my logs before, it's personal logs :
2011-06-29 17:05:01 XMPPResourceConnection.streamClosed() SEVERE: CLOSING STREAM
2011-06-29 17:05:01 XMPPResourceConnection.removeParentSession() SEVERE: REMOVE PARENT SESSION
But we can look that the stream are closed before the error of processing packet.
In client side, strophe.js send his packet (it's not the same test, I say that for rid, sid. The user is the same, and the error are the same):
Sent :
<body rid='481250670' xmlns='http://jabber.org/protocol/httpbind'
sid='6b5daa1d-5d05-4625-acc7-42bbf96d45a2' type='terminate'>
<presence xmlns='jabber:client' type='unavailable'/>
</body>
Coming : <body secure='true' from='******' xmpp:version='1.0' ack='481250669' type='terminate'
xmlns:stream='http://etherx.jabber.org/streams' xmlns='http://jabber.org/protocol/httpbind'
xmlns:xmpp='urn:xmpp:xbosh'>
<presence type='error' xmlns='jabber:client'>
<error type='cancel' code='503'>
<service-unavailable
xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xml:lang='en'
xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>
Service not available.
</text>
</error>
</presence>
</body>
I think I know why this happens. As the client sends unavailable presence stanza in the same body as terminate attribute, the Bosh session is sending connection termination signal to the session manager along with the presence unavailable.
Because of how internals in the Tigase server works the connection termination is handled before the presence unavailable stanza. The error and the rest is just a result of this.
I have created a ticket for this which will be resolved at earliest possible time: https://projects.tigase.org/issues/188
Thank you





Recent comments
1 day 7 hours ago
3 days 10 hours ago
3 days 11 hours ago
3 days 19 hours ago
4 days 5 hours ago
4 days 7 hours ago
4 days 7 hours ago
5 days 6 hours ago
5 days 9 hours ago
5 days 9 hours ago