[jadmin] pyYIMt disconnects after 5 minutes
oliver bril
oliver_bril at hotmail.com
Mon Nov 5 09:28:37 CST 2007
Norman,
Before I began testing this morning I have setup a new gateway (downloaded everything from cvs).
Before I ran this latest test I have deleted yahoouser.dbm.dir and yahoouser.dbm.pag and changed the yahoo.py to what you suggested.
I removed the accounts from my client except my test account, just to be sure nothing else was connecting to the gateway.
This is the output when the client gets disconnected (via the XCP server):
Mon 05 Nov 2007 15:39:10 - CVS 1.68Traceback (most recent call last): File "yahoo.py", line 1311, in <module> rdsocketlist[each].Process() File "/opt/contrib/imgatew/run/PYYIMT/ylib.py", line 657, in Process r = self.sock.recv(1024)error: (131, 'Connection reset by peer') File "yahoo.py", line 1314, in <module> transport.y_closed(rdsocketlist[each]) File "yahoo.py", line 890, in y_closed self.y_send_offline(yobj.fromjid) File "yahoo.py", line 1108, in y_send_offline traceback.print_stack()xmpp_offline: user1 at imdemo.ibpmail.com {'test1': ('unavailable', None, None), 'test2': ('available', None, None)}DEBUG: socket sent <presence to="user1 at imdemo.ibpmail.com" from="yahoo.gateway-test.ibpmail.com" id="3" type="unavailable" />DEBUG: socket sent <presence to="user1 at imdemo.ibpmail.com" from="test2 at yahoo.gateway-test.ibpmail.com/messenger" id="4" type="unavailable" />DEBUG: socket sent <presence to="user1 at imdemo.ibpmail.com" from="test2 at yahoo.gateway-test.ibpmail.com/chat" id="5" type="unavailable" />DEBUG: socket sent <presence to="user1 at imdemo.ibpmail.com" from="yahoo.gateway-test.ibpmail.com" id="6" type="error"> <error code="504" type="wait"> <remote-server-timeout xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /> <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">A remote server or service specified as part or all of the JID of the intended recipient could not be contacted within a reasonable amount of time.</text> </error> </presence>
After this test I stopped the gateway and removed the yahoouser.dbm.dir and yahoouser.dbm.pag and started the gateway again.
I logged on directly to the jabberd2 server. After a few minutes I get disconnected with the same errors.
Now the fun part, when I connected to the yahoo gateway I kept sending data to a yahoo user every 5 seconds for more than 6 minutes. Now the connection doesn't timeout while it normally timed-out after 5 minutes. When I stopped sending data it took 5 minutes before receiving the error. So I think it is safe to conclude that when no data is send for 5 minutes the connection drops dead.
It looks like a firewall timeout. Strange enough I do not have these problems with the msn,icq and aim gateway. Do these gateways send some kind of keep-alive?.
Hope you can help me out.
Regards,
Oliver
> Date: Mon, 5 Nov 2007 15:48:58 +0200> From: norman at rasmussen.co.za> To: jadmin at jabber.org> Subject: Re: [jadmin] pyYIMt disconnects after 5 minutes> > mmm, it's disconnecting because of an socket.error, add an extra> logError around line 1313, so that it looks like this:> > try:> rdsocketlist[each].Process()> except socket.error:> logError()> transport.y_closed(rdsocketlist[each])> except:> logError()> > my guess is that the yahoo server is disconnecting you for some reason.> > When you day it works when connecting directly, what are you changing?> (just your xmpp account?) (are you trying to use the same yahoo id on> both accounts?)> > Norman> > On Nov 5, 2007 1:27 PM, oliver bril <oliver_bril at hotmail.com> wrote:> >> > Norman,> >> > Thanks for replying so quickly!> >> > i carried out what you asked hope this is what you were looking for.> >> > File "yahoo.py", line 1313, in <module>> >> >> > transport.y_closed(rdsocketlist[each])> >> > File "yahoo.py", line 890, in y_closed> >> > self.y_send_offline(yobj.fromjid)> >> > File "yahoo.py", line 1108, in y_send_offline> >> > traceback.print_stack()> >> > xmpp_offline: user1 at imdemo.ibpmail.com {'test1': ('unavailable', None,> > None), 'test2': ('available', None, None)}> >> > DEBUG: socket sent <presence to="user1 at imdemo.ibpmail.com"> > from="yahoo.gateway-test.ibpmail.com" id="3" type="unavailable" />> >> > DEBUG: socket sent <presence to="user1 at imdemo.ibpmail.com"> > from="test2 at yahoo.gateway-test.ibpmail.com/messenger" id="4"> > type="unavailable" />> >> > DEBUG: socket sent <presence to="user1 at im-test.ibpmail.com"> > from="test2 at yahoo.gateway-test.ibpmail.com/chat" id="5" type="unavailable"> > />> >> >> > DEBUG: socket sent <presence to="user1 at imdemo.ibpmail.com"> > from="yahoo.gateway-test.ibpmail.com" id="6" type="error">> >> > <error code="504" type="wait">> >> > <remote-server-timeout xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />> >> > <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">A remote server or> > service specified as part or all of the JID of the intended recipient could> > not be contacted within a reasonable amount of time.</text>> >> > </error>> >> > </presence>> > Regards,> > Oliver> >> >> >> >> > ________________________________> >> > > Date: Mon, 5 Nov 2007 12:44:55 +0200> > > From: norman at rasmussen.co.za> > > To: jadmin at jabber.org> > > Subject: Re: [jadmin] pyYIMt disconnects after 5 minutes> >> >> > >> > > On Nov 5, 2007 11:41 AM, oliver bril <oliver_bril at hotmail.com> wrote:> > > > Perhaps someone can help me out. Somehow my yahoo gateway disconnects> > the> > > > user after 5 minutes. So everything works fine only I can't stay> > connected> > > > longer than 5 minutes.> > > >> > > > I don't have any problems with my msn,icq and aim gateway. Also when I> > > > connect directly to the jabberd2 server I have this problem so it> > doesn't> > > > seem to be a problem between the jabberXCP and Jabbed2 server.> > > >> > > > The debug log:> > > >> > > > xmpp_offline: user1 at imdemo.ibpmail.com {'test1': ('available', 'away',> > > > None), 'test2': ('available', None, None)}> > >> > > Hey oliver,> > >> > > hmm:> > >> > > xmpp_offline is printed in the y_send_offline method,> > > y_send_offline is called from three places:> > > - xmpp presense unavailable was received> > > - transport was asked to shutdown> > > - y_closed was called.> > >> > > y_closed is the only place that will send a REMOTE_SERVER_TIMEOUT> > > error as far as I can see.> > >> > > now the tricky part is y_closed can be called from:> > > - find-bad-connections,> > > - yahoo closed connection,> > > - trying to register when already connected,> > > - yahoo reporting successful login twice.> > >> > > Can you insert a print_stack into y_send_offline in yahoo.py, so it> > > looks like this:> > >> > > def y_send_offline(self,fromjid,resource=None,status=None):> > > traceback.print_stack()> > > if config.dumpProtocol: print> > > 'xmpp_offline:',fromjid,self.userlist[fromjid].roster> > > fromstripped = fromjid> > >> > > it should print out the current stack on stdout, which will help us> > > discover where the event is coming from.> > >> > > --> > > - Norman Rasmussen> > > - Email: norman at rasmussen.co.za> > > - Home page: http://norman.rasmussen.co.za/> > > _______________________________________________> > > JAdmin mailing list> > > JAdmin at jabber.org> > > http://mail.jabber.org/mailman/listinfo/jadmin> > > FAQ: http://www.jabber.org/about/jadminfaq.shtml> > > _______________________________________________> >> >> >> > ________________________________> > Express yourself instantly with MSN Messenger! MSN Messenger> > _______________________________________________> > JAdmin mailing list> > JAdmin at jabber.org> > http://mail.jabber.org/mailman/listinfo/jadmin> > FAQ: http://www.jabber.org/about/jadminfaq.shtml> > _______________________________________________> >> >> > > > -- > - Norman Rasmussen> - Email: norman at rasmussen.co.za> - Home page: http://norman.rasmussen.co.za/> _______________________________________________> JAdmin mailing list> JAdmin at jabber.org> http://mail.jabber.org/mailman/listinfo/jadmin> FAQ: http://www.jabber.org/about/jadminfaq.shtml> _______________________________________________
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.jabber.org/pipermail/jadmin/attachments/20071105/c9f632b3/attachment.htm
More information about the JAdmin
mailing list