when an xo loses connection, how long does it take to disappear from other's neighbor view?

Giannis Galanis galanis at laptop.org
Wed Nov 7 17:42:53 EST 2007


Simon,

I think the email i send you was incomplete, my connection was poor and
gmail must have saved the wrong draft. But, 1-2-3, is what i intended to
send you.

I also meant to ask, How many times do you try _init_connection before you
assume the connection is down?


I hope so. I have a tarball with the patch, but I'm still waiting for
> Update.1 approval (it's unclear whether I can build RPMs for Joyride
> before I get Update.1 approval or not). If you're at 1CC, could you please
> annoy the ApprovalForUpdate people in person until they either look at
> their
> bugs, or confirm whether I'm still allowed to build RPMs in Koji?


I can definitely try to arrange this. But, can you please send me the
tarball to test it in the mean time?

> 2. We need to be able to restart PS. As you say this is not possible, but
> if
> > we restart sugar will PS restart as well?
>
> Yes, that's right (the D-Bus session bus will exit, which causes
> D-Bus services like PS to exit too unless they've specifically asked not
> to).
>
> I see you assigned the bug about "need to be able to cope with PS
> restarts" to
> yourself. Unless you're planning to implement the necessary Python code
> in sugar.presence yourself, please don't.

I don't think it's feasible to implement correct handling of PS restarts in
> sugar.presence for Update.1, so unless the release engineering team
> specifically tell me to, I won't be addressing that bug until a later
> release.


Ok, i will reassign the bug to presenceservice. As long as restarting sugar
works, we can stick to that for now.


> 3. We need to force gabble to run. We have several instances of 4193
> (almost
> > all XOs connected to schoolserver,AP are running salut). Or at least to
> > force trying to connect to jabber server.
>
> Please see my comments on #4193 regarding steps to take to debug (I think
> it's #4193 I commented on - I can't remember bug numbers, and Trac is
> down at the moment).
>
> In summary:
>
> * try resolving the server with "getent hosts jabber.laptop.org "
> * try pinging it with "ping jabber.laptop.org"
> * try connecting via TCP with "telnet jabber.laptop.org 5222"
>   (type "hello" and press Enter, if all goes well you should get
> disconnected
>   with an error message that mentions "XML not well formed")


The bug is indeed 4193.  I have replied to your post, but as the trac is
down you probably havent seen it.
I made all three tests:

$getent hosts jabber.laptop.org
     2001:4830:2446:ff00:201:6cff:fe07:68ec jabber.laptop.org   <-----
frequent reply
     18.85.46.41     jabber.laptop.org  <----------rare reply

$ping jabber.laptop.org
     PING jabber.laptop.org (18.85.46.41) 56(84) bytes of data.
     64 bytes from jabber.laptop.org (18.85.46.41): icmp_seq=1 ttl=63 time=
67.4 ms
     ...

$telnet jabber.laptop.org 5222
     blabla... connected
hello
     replied with an xml packet with "xml-not-well-formed" included

so it seems that it is a PS issue. Perhaps it is not waiting long enough, or
doesnt make enough tries when trying to connect. I have reassigned the bug
to presenceservice.


If any of these steps fail, Gabble won't be able to connect either, and
> there's nothing Gabble can do about it - talk to the Network Manager
> maintainer instead, since that's the component responsible for getting
> network connectivity and DNS on the XO.
>
> If you check the Gabble log you'll probably find that Gabble is trying
> to connect, but failing because either it can't resolve
> jabber.laptop.org in DNS, or it can't get a TCP connection there. That was
> my
> diagnosis of two of the cases you mentioned in your bug with 3 sets of
> logs
> (which may have been #4193?). In the third case it looked as though you
> hadn't
> waited long enough for the log to indicate success or failure.
>
> > 4. The process of trying to connect to the jabber server, is done by
> > telepathy-gabble, or by the presence



What I meant here is, Does the PS check if jabber server is accessible, and
then runs telepathy-gabble?, or this is one of the tasks of
telepathy-gabble?, which as I see you replied to

Depends what you mean. The Presence Service is responsible for choosing when
>
> to try to connect (at which time it calls the Connect() D-Bus method
> on Gabble), but it's Gabble that actually opens a TCP socket to the Jabber
> server and tries to talk to it. You can see this in the PS log, for
> instance:
>
> 1194431620.966651 DEBUG s-p-s.telepathy_plugin: <ServerPlugin object at
> 0x85f1e14 (telepathy_plugin+TelepathyPlugin at 0x82c8fb0)>: connecting...
> 1194431620.967008 DEBUG s-p-s.telepathy_plugin: <ServerPlugin object at
> 0x85f1e14 (telepathy_plugin+TelepathyPlugin at 0x82c8fb0)>: Connect()
> succeeded
>
> (note that "Connect() succeeded" is a bit misleading - it just means
> that the connection manager has said "OK, I'll try", rather than that it
> has actually been able to connect.)
>
> In the telepathy-gabble log you'll then see something like this:
>
> ** (telepathy-gabble:25330): DEBUG: do_connect: calling lm_connection_open
> Going to connect to olpc.collabora.co.uk
> Trying 195.10.223.134 port 5222...
> ** (telepathy-gabble:25330): DEBUG: tp_base_connection_change_status:
> was 4294967295, now 1, for reason 1
> ** (telepathy-gabble:25330): DEBUG: tp_base_connection_change_status:
> emitting status-changed to 1, for reason 1
>
> (here status 4294967295 means "haven't tried to connect yet", status 1
> means
> "connecting", reason 1 means "by user request")


so at this point is where the common bug is?

have you tried to check connecting to gabble with the laptops available
there? Does it work fine?
Perhaps you can connect to an XO here with ssh, and debug real time what is
exactly happening.

it was suggested (i think bug 4700) that it is possible that the jabber
server might have a limit in number of users. Is this possible?

yani
- Hide quoted text -

If the TCP connection succeeds, in the telepathy-gabble log you'll see:
>
> Connection success.
> SEND:
> - -----------------------------------
> <?xml version='1.0' encoding='UTF-8'?>
> - -----------------------------------
>
> Some XMPP handshaking will follow.
>
> Finally, when Gabble has finished doing its initial setup on the
> connection, it will signal that it's become connected:
>
> ** (telepathy-gabble:25330): DEBUG: tp_base_connection_change_status:
> was 1, now 0, for reason 1
> ** (telepathy-gabble:25330): DEBUG: tp_base_connection_change_status:
> emitting status-changed to 0, for reason 1
>
> (here status 0 means "connected")
>
> and the Presence Service will receive the StatusChanged signal via D-Bus:
>
> 1194431621.473412 DEBUG s-p-s.telepathy_plugin: <ServerPlugin object at
> 0x85f1e14 (telepathy_plugin+TelepathyPlugin at 0x82c8fb0)>: connected
>
>     Simon
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: OpenPGP key: http://www.pseudorandom.co.uk/2003/contact/ or
> pgp.net
>
> iD8DBQFHMaGcWSc8zVUw7HYRAjPOAKDuLi+Vp04s8aGs9pbGQ8Lkr8fwzgCgxaza
> ipqZMRnw9vKHTYTJT+e96qg=
> =vEu4
> -----END PGP SIGNATURE-----
> _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
> http://lists.laptop.org/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/devel/attachments/20071107/0475d193/attachment.html>


More information about the Devel mailing list