Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
EndaD #1
Member since Oct 2014 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: TCP window size decreasing to 0
hi,
we have an application utilising the agsXMPP.dll (1.1.1.0)that is getting an intermittent issue at customer sites
where our application is disconnected from the presence server.
This disconnection happens because the TCP window size decreases to 0.

We have a log message in onReadXML which works then seems to stop a few minutes before the
disconnect.
Is there a way to debug the internal socket reading in the agsXMPP code?
Are there any known issues in this area?

There are 40-50 users of this application at one customer site and they are reporting the issue 8-10 times
a day.
Avatar
Alex #2
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
there are no known issues.

Does the server close the stream?
Do you see a stream footer from the server in the logs? (</stream:stream>)?
Can you post logs where we can see the connection loss?
Are you using Keep Alives?
Do you reply to Pings if your server sends them?

There are handlers for OnReadSocketData and OnWriteSocketData. But I don't think they will help you. You can download the latest sources from SVN and add additional debug info.

Alex
Avatar
EndaD #3
Member since Oct 2014 · 3 posts
Group memberships: Members
Show profile · Link to this post
hi Alex,

Thanks very much for the quick response.
The server closes the stream. We don't see a stream footer in the logs.
KeepAlives are on by default.
We added today handlers for onReadSocketData and onWriteSocketData - thanks - guess might help.

I seem to be getting a connection error connecting to the SVN repository.
Is this the correct location -  svn://svn.ag-software.de/agsxmpp ?
(Maybe problem is on my end though).

Logs below:
You can see application reading messages fine.
Then in wireshark traces can "see" more messages arriving and each time a message arrives, the client sends a TCP message
with a reducing TCP window size, so we speculate that application stopped parsing messages after a particular message...

7 minutes after last onReadXML, get a disconnect.



2014-10-22 08:55:58.255 +02:00    UCCPOCS    30    0    Debug     None                    xmppOnReadXml XML = <presence xmlns="jabber:client" from="agt6670@pres.acompany.local/acomponent-6670switch" to="agt6682@pres.acompany.local/aproduct"><priority>-1</priority><presence xmlns="urn:ietf:params:xml:ns:pidf" entity="pres:agt6670@pres.acompany.local"><tuple id="phone_presence.acompany.country"><status><basic>open</basic></status><r:activities xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"><avav:available xmlns:avav="urn:bcompany:com:presence:rpid:availability" /></r:activities><r:class xmlns:r="urn:ietf:params:xml:ns:pidf:rpid">Phone</r:class><avcl:vClass xmlns:avcl="urn:bcompany:com:PS:rpid:vclass">bcompany.PS</avcl:vClass><contact>agt6670@pres.acompany.local</contact><timestamp>2014-10-22T06:55:57Z</timestamp><apas:extended-state xmlns:apas="urn:com:bcompany:pidf:rpid:extended"><apas:phonestate><apas:onhook /></apas:phonestate></apas:extended-state></tuple><tuple id="enterprise-im_presence.acompany.country_1"><status><basic>closed</basic></status><r:activities xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"><avav:offline xmlns:avav="urn:bcompany:com:presence:rpid:availability" /></r:activities><r:class xmlns:r="urn:ietf:params:xml:ns:pidf:rpid">Enterprise IM</r:class><avcl:vClass xmlns:avcl="urn:bcompany:com:PS:rpid:vclass">bcompany.PS</avcl:vClass><contact>agt6670@pres.acompany.local</contact><timestamp>2014-10-22T06:55:57Z</timestamp></tuple><d:person xmlns:d="urn:ietf:params:xml:ns:pidf:data-model" id="ps_generated"><r:activities xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"><avav:available xmlns:avav="urn:bcompany:com:presence:rpid:availability" /></r:activities><avav:availabilityDescription xmlns:avav="urn:bcompany:com:presence:rpid:availability"><avav:component type="overall-presence-state" /></avav:availabilityDescription></d:person></presence></presence>
2014-10-22 08:55:58.489 +02:00    UCCPOCS    11    0    Debug     None                    xmppOnReadXml XML = <iq xmlns="jabber:client" to="agt6682@pres.acompany.local/aproduct" id="agsXMPP_18" type="result" from="agt6670@pres.acompany.local" xml:lang="en"><vCard xmlns="vcard-temp"><TEL><HOME /><NUMBER>6670</NUMBER></TEL></vCard></iq>
2014-10-22 08:56:00.033 +02:00    UCCPOCS    30    0    Debug     None                    xmppOnReadXml XML = <presence xmlns="jabber:client" to="agt6682@pres.acompany.local/aproduct" xml:lang="en" from="agt6670@pres.acompany.local/productB"><show>chat</show><priority>127</priority><presence xmlns="urn:ietf:params:xml:ns:pidf" entity="pres:agt6670@pres.acompany.local"><tuple id="enterprise-im_presence.acompany.country_1"><status><basic>open</basic></status><r:activities xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"><r:available /></r:activities><r:class xmlns:r="urn:ietf:params:xml:ns:pidf:rpid">Enterprise IM</r:class><avcl:vClass xmlns:avcl="urn:bcompany:com:PS:rpid:vclass">bcompany.PS</avcl:vClass><contact>agt6670@pres.acompany.local</contact><timestamp>2014-10-22T06:55:59Z</timestamp></tuple><tuple id="agt6670_pres.acompany.local_3"><status><basic>closed</basic></status><r:activities xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"><avav:offline xmlns:avav="urn:bcompany:com:presence:rpid:availability" /></r:activities><r:class xmlns:r="urn:ietf:params:xml:ns:pidf:rpid">Video</r:class><avcl:vClass xmlns:avcl="urn:bcompany:com:PS:rpid:vclass">bcompany.1XC</avcl:vClass><contact priority="0.80">agt6670@pres.acompany.local</contact><timestamp>2014-10-22T06:55:59Z</timestamp></tuple><tuple id="acomponent-6670switch"><status><basic>open</basic></status><r:activities xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"><avav:available xmlns:avav="urn:bcompany:com:presence:rpid:availability" /></r:activities><apas:extended-state xmlns:apas="urn:com:bcompany:pidf:rpid:extended"><apas:phonestate><apas:onhook /></apas:phonestate></apas:extended-state><r:class xmlns:r="urn:ietf:params:xml:ns:pidf:rpid">Phone</r:class><avcl:vClass xmlns:avcl="urn:bcompany:com:PS:rpid:vclass">bcompany.Phone</avcl:vClass><contact /><timestamp>2014-10-22T06:55:57Z</timestamp></tuple><d:person xmlns:d="urn:ietf:params:xml:ns:pidf:data-model" id="ps_generated"><r:activities xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"><r:available /></r:activities><avav:availabilityDescription xmlns:avav="urn:bcompany:com:presence:rpid:availability"><avav:component type="overall-presence-state" /></avav:availabilityDescription></d:person></presence></presence>
2014-10-22 08:57:58.276 +02:00    UCCPOCS    29    0    Debug     None                    xmppOnWriteXml XML = 
2014-10-22 08:59:58.278 +02:00    UCCPOCS    29    0    Debug     None                    xmppOnWriteXml XML = 
2014-10-22 09:01:58.297 +02:00    UCCPOCS    4    0    Debug     None                    xmppOnWriteXml XML = 
2014-10-22 09:03:58.304 +02:00    UCCPOCS    4    0    Debug     None                    xmppOnWriteXml XML = 
2014-10-22 09:05:58.330 +02:00    UCCPOCS    5    0    Debug     None                    xmppOnWriteXml XML =
2014-10-22 09:03:58.678 +02:00    Product MainForm    4    0    Debug     None                    xmppOnConnectionStateChanged: Disconnected
This post was edited on 2014-10-24, 23:08 by Alex.
Avatar
Alex #4
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
see nothing wrong on your log. Look like either a router in your network kills the socket because of inactivity, or the Xmpp server.
We were updating servers today. SVN should work again now.

Have you tried to send Xmpp Pings every 2 minutes?
http://xmpp.org/extensions/xep-0199.html

Alex
Avatar
EndaD #5
Member since Oct 2014 · 3 posts
Group memberships: Members
Show profile · Link to this post
hi,
Thanks for the responses.
Customer appears to be ruling out network config,so I think adding
debug to agsxmpp and our code might be next step to prove/disprove culpability.
We were running V1.1.1.0, but from SVN I can download source V1.3.1.0.
Are there many changes between V1.1 and V1.3?
The changelog indicates bug fixes in V1.2 (which do not seem to be major churn).
What is delta between V1.3 and V1.2?
Would you suggest moving to V1.3 from V1.1?
If not, what SVN revision is V1.1 and I can download/add debug to that?
Apologies if I am missing something obvious here.
Regards,
Thanks again,
Enda
Avatar
Alex #6
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
there are lots of bugfixes and improvements since 1.1. The version you run is probably 5 years old. I suggest always to run the latest code from SVN. There are no API or other breaking changes, so please try to update first.

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:
Forum: agsXMPP RSS