Bug In Disconnection of Tigase bosh mode ?

4 replies [Last post]
Anonymous

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=unavailable

Sincerely Toti,

kobit's picture
Offline
Joined: 2006-09-03
Points: 267814

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.

Toti (not verified)

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>

kobit's picture
Offline
Joined: 2006-09-03
Points: 267814

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

Toti (not verified)

Thank you

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.