Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
dtjoa #1
Member since Jul 2012 · 39 posts
Group memberships: Members
Show profile · Link to this post
Subject: cannot reconnect after error
Alex,
I encounter the following situation:
- when the server is starting up, and client is in the process of connecting
- On BoshException error, client app closes the connection (see SND: </stream:stream>)
- however, next come server responses
- Matrix library continues with the login
- But, server, I think, does not response to "auth" message (probably seeing </stream:stream>)
- Once, this happens, I can't seem to close the XmppClient. ActiveStream is true, and calling Close() on XmppClient object does not seem to reset ActiveStream.

2012-10-12 10:23:57,402 [1] INFO  CmXmpp.XmppPresenter - SND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="svr02001.uc.test.lab.com" version="1.0" >
2012-10-12 10:23:57,402 [1] INFO  CmXmpp.XmppPresenter - OnCreateBoshSession
2012-10-12 10:23:57,667 [1] WARN  CmXmpp.XmppPresenter - OnError(Matrix.Net.BoshException: BoshException ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at #=qKkdH6HdEGNHwG2LMdqeFqREb4CubSocdKOaCl4$aUkQ=.#=qoRllyUvp3L6$89m00OD_Mg==(IAsyncResult #=qQTD02PTcOGl0q$iYsfAPTg==)
   --- End of inner exception stack trace ---)
2012-10-12 10:23:57,667 [1] INFO  CmXmpp.XmppPresenter - XmppClient.Close() restart connection in 2105 milliseconds
2012-10-12 10:23:57,667 [1] INFO  CmXmpp.XmppPresenter - SND: </stream:stream>
2012-10-12 10:23:57,683 [1] INFO  CmXmpp.XmppPresenter - RCV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="svr02001.uc.test.lab.com" version="1.0" id="5294cb9b46e394c8fd70ffae6746acf9aea0d7ab" >
2012-10-12 10:23:57,683 [1] INFO  CmXmpp.XmppPresenter - RCV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
    <mechanism>PLAIN</mechanism>
  </mechanisms>
  <c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.process-one.net/en/ejabberd/" ver="yy7di5kE0syuCXOQTXNBTclpNTo=" />
  <register xmlns="http://jabber.org/features/iq-register" />
</stream:features>
2012-10-12 10:23:57,683 [1] INFO  CmXmpp.XmppPresenter - SND: <auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">XXX</auth>
This post was edited on 2012-12-14, 12:07 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
we have not seen such problems before. Please provide a test case and exact descriptions how to cause this exceptions.

Alex
Avatar
dtjoa #3
Member since Jul 2012 · 39 posts
Group memberships: Members
Show profile · Link to this post
Yes, I'm still trying to reproduce the problem.

In the meantime, I was wondering, when client side tries to close the stream (sending </stream:stream>), should the client ignore any subsequent messages from the server?
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The session is closed when you get the OnClose event. Every incoming stanza before OnClose should not be ignored.
Avatar
dtjoa #5
Member since Jul 2012 · 39 posts
Group memberships: Members
Show profile · Link to this post
Another question, in case of server not sending </stream:stream> when we close the stream, what will the Matrix library do? What client app should do to re-initialize the connection?
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
when you call Close() on the XmppClient then MatriX is closing the stream, and the server MUST also close the stream. So this case will not happen when there is not a bug in the server or the client.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: