Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
Sterner #1
Member since Oct 2015 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Mono/Unity disconnection
Hi Alex

We have sometimes disconnection without any error notification. Mono and Matrix 1.6 are used. Stack trace is next:
  1. at System.Environment.get_StackTrace()   at JabberManagerClient.OnClose(System.Object sender, Matrix.EventArgs args)   at System.Reflection.MonoMethod.InternalInvoke(System.Object , System.Object[] , System.Exception ByRef )   at System.Reflection.MonoMethod.Invoke(System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)   at System.Reflection.MethodBase.Invoke(System.Object obj, System.Object[] parameters)   at System.Delegate.DynamicInvokeImpl(System.Object[] args)   at System.MulticastDelegate.DynamicInvokeImpl(System.Object[] args)   at System.MulticastDelegate.DynamicInvokeImpl(System.Object[] args)   at System.MulticastDelegate.DynamicInvokeImpl(System.Object[] args)   at System.MulticastDelegate.DynamicInvokeImpl(System.Object[] args)   at System.MulticastDelegate.DynamicInvokeImpl(System.Object[] args)   at System.Delegate.DynamicInvoke(System.Object[] args)   at Matrix.XmppStream.?(System.Delegate ?, System.Object[] ?)   at Matrix.XmppStream.?(System.Delegate ?, System.Object ?, Matrix.EventArgs ?)   at Matrix.XmppStream.FireOnClose()   at Matrix.XmppStream.CleanupSession()   at Matrix.Xmpp.Client.XmppClient.CleanupSession()   at Matrix.XmppStream.3q2mzyj4wtv734ttjnj6bnrw7kquujzy  ?(System.Object ?, Matrix.EventArgs ?)   at Matrix.Net.BaseSocket.FireOnDisconnect()   at Matrix.Net.ClientSocket.Disconnect()   at Matrix.Net.ClientSocket.EndReceive(IAsyncResult ar)

Analysis of log had shown that ping iq is not arrived from server. Server is configured to send ping every minute. Sometimes ping doesn't arrive. Does the stack trace say that connection is closed from server side?


For example, it seems that any communications are stopped:
  1. 6360:[2016-Feb-10 20:04:00.795006] CHAT: poison <iq from="na.net" to="poison@na.net/MatriX" id="17371137652601098730" type="get" xmlns="jabber:client">  <ping xmlns="urn:xmpp:ping" /></iq>
  2. 6360:[2016-Feb-10 20:04:00.813413] CHAT: poison <iq to="na.net" id="17371137652601098730" type="result" xmlns="jabber:client" />
  3. 6360:[2016-Feb-10 20:33:00.083323] CHAT: poison <presence to="faq@conference.na.net/poison" type="unavailable" xmlns="jabber:client" />
  4. 6360:[2016-Feb-10 20:33:00.274206] CHAT: <color=red>Jabber.Close</color>    at System.Environment.get_StackTrace()   at JabberManagerClient.OnClose(System.Object sender, Matrix.EventArgs args)
  5.  
  6. Another example:
  7. 1728:[2016-Feb-10 14:05:53.648585] CHAT: _van_0_pelt <iq from="na.net" to="_van_0_pelt@na.net/MatriX" id="13716791475788078576" type="get" xmlns="jabber:client">  <ping xmlns="urn:xmpp:ping" /></iq>
  8. 1728:[2016-Feb-10 14:05:53.691298] CHAT: _van_0_pelt <iq to="na.net" id="13716791475788078576" type="result" xmlns="jabber:client" />
  9. .
  10. every 5 second message or presence
  11. .
  12. 1728:[2016-Feb-10 14:09:52.609191] CHAT: _van_0_pelt <presence from="nation5@conference.na.net/_sir_0_gray_skulls" to="_van_0_pelt@na.net/MatriX" xmlns="jabber:client">  <x xmlns="http://jabber.org/protocol/muc#user">    <item affiliation="none" role="participant" />  </x></presence>
  13. 1728:[2016-Feb-10 14:10:55.251728] CHAT: _van_0_pelt <presence to="dhc@conference.na.net" xmlns="jabber:client">  <show>chat</show>  <status>1542;Traders Cutter;Unknown;3</status>  <priority>25</priority></presence>
1728:[2016-Feb-10 14:10:55.411335] CHAT: <color=red>Jabber.Close</color>    at System.Environment.get_StackTrace()   at JabberManagerClient.OnClose(System.Object sender, Matrix.EventArgs args)

Communication with server continue to run few minutes after last ping and disconnect happens when there is nothing from client within a minute. Maybe sending ping "result" to server can solve the issue?

Thank you for advice in advance.
This post was edited 4 times, last on 2016-02-12, 09:40 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I cannot decode your stacktrace above. It looks like some characters were lost when you posted it. So I cannot get the complete exception.

But it looks to me that the connection was lost and MatriX raises an OnClose to you.
You can loose the connection for many reasons, most of them are network outages/problems.

In this case you just have to reconnect your XmppClient.

You also use an old version of MatriX. So I suggest to update.

Alex
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: