qbittorrent can't find any peer over LAN

Bug #582373 reported by Mariusz Fik
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libtorrent-rasterbar
Unknown
Unknown
qBittorrent
Invalid
Undecided
Unassigned

Bug Description

2 PC in the same network, firewall off. Both of them run qbittorrent 2.2.7 with libtorrent-rasterbar-0.14.10.

The PC1 have already downloaded some.ise file which is seeded. Then I start qbittorrent on PC2 and load the same torrent file. qbittorrent on PC2 can't find a peer (actually running on PC1) so the feature called LSD is not working. I can't find any options to log this feature. Is there any option to help debug it? If yes, please let me know so I'll provide more info.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote : Re: [Bug 582373] [NEW] qbittorrent can't find any peer over LAN

As I said previously, you should really ask about this to
libtorrent-rasterbar author.

Chris.

On Tue, May 18, 2010 at 7:07 PM, Mariusz Fik <email address hidden> wrote:

> Public bug reported:
>
> 2 PC in the same network, firewall off. Both of them run qbittorrent
> 2.2.7 with libtorrent-rasterbar-0.14.10.
>
> The PC1 have already downloaded some.ise file which is seeded. Then I
> start qbittorrent on PC2 and load the same torrent file. qbittorrent on
> PC2 can't find a peer (actually running on PC1) so the feature called
> LSD is not working. I can't find any options to log this feature. Is
> there any option to help debug it? If yes, please let me know so I'll
> provide more info.
>
> ** Affects: qbittorrent
> Importance: Undecided
> Status: New
>
> --
> qbittorrent can't find any peer over LAN
> https://bugs.launchpad.net/bugs/582373
> You received this bug notification because you are subscribed to
> qBittorrent.
>

Revision history for this message
Mariusz Fik (fisiu) wrote :

Ok, I'll forward it to libtorrent bugzilla. But I wrote it here because I use qbt and _qbt_ can't connect with other peers over LAN (which use qbt too). I, as normal user, don't use libtorrent directly but qbt which depends on it.

Revision history for this message
Mariusz Fik (fisiu) wrote :
Revision history for this message
Christophe Dumez (hydr0g3n) wrote : Re: [Bug 582373] Re: qbittorrent can't find any peer over LAN

Well, you are using a GUI to libtorrent-rasterbar :P

On Tue, May 18, 2010 at 7:58 PM, Mariusz Fik <email address hidden> wrote:

> I filled a bug report here:
> http://code.google.com/p/libtorrent/issues/detail?id=67
>
> ** Bug watch added: code.google.com/p/libtorrent/issues #67
> http://code.google.com/p/libtorrent/issues/detail?id=67
>
> --
> qbittorrent can't find any peer over LAN
> https://bugs.launchpad.net/bugs/582373
> You received this bug notification because you are subscribed to
> qBittorrent.
>

Revision history for this message
Mariusz Fik (fisiu) wrote :

GUI? Nice summary for Your work :P

Revision history for this message
leigh123linux (leigh123linux-deactivatedaccount) wrote :

This sounds better :-) "A Bittorrent client using rb_libtorrent and a Qt4 Graphical User Interface."

Revision history for this message
Mariusz Fik (fisiu) wrote :

A Bittorrent client - that's it! The bug is about it :P

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

The only actions I can do in qBittorrent are "start/stop LSD". I checked my code and I believe I properly start LSD. As a consequence, the problem must be in libtorrent-rasterbar, or more likely (as I suggested before) in your network configuration.

As far as I know (I did not check the LSD code), it discovers local peers using broadcasting. As a consequence, if your network does not support broadcasting, then it probably won't work.

To test if broadcasting work, just ping the broadcast IP and see if the other local computer(s) respond. The broadcast IP is the last IP allowed by your mask, for example 192.168.1.255 is a common value (if the mask if 255.255.255.0 and your IP is 192.168.1.x).

For example, on my LAN, broadcasting is not working. This is not uncommon. Maybe this is due to the fact that I use wifi.I am no networking expert but you can probably find documentation by googling.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

For the record, filing a bug against qBittorrent when you are unsure if the problem is located in qBittorrent or libtorrent is fine with me. I usually redirect the libtorrent author when necessary. The users usually don't make the difference between both (and they should not have to). Still, you are not an average user since you are a packager and thus you should know that qBittorrent is just the GUI and libtorrent handles the networking/Bittorrent stuff.

The issue here is that I already asked you to check whether your network broadcasting during our previous IRC conversation. You reported the bug twice (on libtorrent and qBittorrent bug tracker) but you did not specify if you actually tested broadcasting on your network. As a consequence, I was merely wondering if you actually did this "basic" test before reporting it again.

If so, I would have appreciated if you had mentioned the result of this test in your bug report (otherwise I am still missing this information from your previous report on IRC).

Also for the record, I am a GUI developer and I have very little understanding of Bittorrent protocol and libtorrent-rasterbar implementation. qBittorrent is really just a GUI to libtorrent-rasterbar. You will know more about Local peer discovery than me by simply using google.

Revision history for this message
Mariusz Fik (fisiu) wrote :

I forgot paste it before:

fisiu@pendrak:~> ping -b 192.168.1.255
WARNING: pinging broadcast address
PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=2.79 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=2.69 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=3.03 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=2.68 ms
^C
--- 192.168.1.255 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 2.684/2.804/3.039/0.142 ms

No offence, Chris.

Regards,
Mariusz

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Good. Is 192.168.1.1 the IP of the other machine on your network that you wish LSD would discover ?
I'm asking because it looks like a router IP.

I'm missing information here. Is the machine that should be discovered through LSD answering to the broadcast?

Revision history for this message
Mariusz Fik (fisiu) wrote :

You're right. It is router IP. PC1 is 192.168.1.2 and the PC2 is 198.168.1.5. All details are posted on http://code.google.com/p/libtorrent/issues/detail?id=67

Revision history for this message
leigh123linux (leigh123linux-deactivatedaccount) wrote :

In that case your network in broken, this isn't a qbittorrent or libtorrent issue.

[leigh@localhost ~]$ ping -b 192.168.1.255
WARNING: pinging broadcast address
PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data.
64 bytes from 192.168.1.5: icmp_seq=1 ttl=64 time=0.404 ms
64 bytes from 192.168.1.77: icmp_seq=1 ttl=64 time=0.476 ms (DUP!)
64 bytes from 192.168.1.5: icmp_seq=2 ttl=64 time=0.325 ms
64 bytes from 192.168.1.77: icmp_seq=2 ttl=64 time=0.619 ms (DUP!)
64 bytes from 192.168.1.5: icmp_seq=3 ttl=64 time=0.322 ms
64 bytes from 192.168.1.77: icmp_seq=3 ttl=64 time=0.555 ms (DUP!)
64 bytes from 192.168.1.5: icmp_seq=4 ttl=64 time=0.386 ms
64 bytes from 192.168.1.77: icmp_seq=4 ttl=64 time=0.735 ms (DUP!)
64 bytes from 192.168.1.5: icmp_seq=5 ttl=64 time=0.328 ms
64 bytes from 192.168.1.77: icmp_seq=5 ttl=64 time=0.394 ms (DUP!)
64 bytes from 192.168.1.5: icmp_seq=6 ttl=64 time=0.266 ms
64 bytes from 192.168.1.77: icmp_seq=6 ttl=64 time=0.773 ms (DUP!)
^C
--- 192.168.1.255 ping statistics ---
6 packets transmitted, 6 received, +6 duplicates, 0% packet loss, time 5835ms
rtt min/avg/max/mdev = 0.266/0.465/0.773/0.162 ms

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

You should probably disable the firewalls on both machines to make sure the ping is broadcasted and that the second machine can send the response back. As you can see from your output, the second machine is not answering the broadcast for some reason. Thus, there is a network configuration problem and this is not surprising that LSD does not operate properly.

Revision history for this message
Mariusz Fik (fisiu) wrote :

I disabled firewall completely on both PCs. I tried with different OSes (Archlinux). The output from shell during ping of broadcast is the same. But when I run qbittorrent on Archlinux (PC1) and started download torrent (ubuntu iso), qbt found 1 peer over LSD. Proof on attached screen. Second PC is still the same PC, with openSUSE.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

This is really strange :) Do you have the same libtorrent-rasterbar version in OpenSuse and ArchLinux?

It may suggest a regression (if Archlinux version is older) or a recent fix (if ArchLinux version is newer) on libtorrent-rasterbar side.

Revision history for this message
Mariusz Fik (fisiu) wrote :

Archlinux uses libtorrent-rasterbar-0.15.0 with disable-valloc patch while openSUSE uses 0.14.10.
I'll try to build some svn snapshots of libtorrent and qbt on openSUSE.

Revision history for this message
Vadim Plessky (v-plessky) wrote :

For the records: multicast ping
#ping -b 192.168.1.255
is available on Linux, but it doesn't exist on WIndows.

At the same time, Azureus/Vuze 4.4.0.4 can easily detect each other running in the same subnet (PC1: 192.168.1.30, PC2: 192.168.1.50)

I also tried #ping -b 192.168.1.255
on my Linux machine (OpenSUSE 11.3 Factory) with firewall switched off.
I don't get any response. Local area netwrok is switched.

Pls also look at
- http://forum.utorrent.com/viewtopic.php?id=37962
- http://test.utorrent.com/forum/viewtopic.php?id=45357

So it seems Local Multicast address is: 239.192.152.143 : 6771

We should test this address, not 192.168.1.1

Revision history for this message
Vadim Plessky (v-plessky) wrote :

BTW: another way to discover Local Peers is using Unicast, not Multicast.
I's slower but can give very good results.

Let's suggest you have 192.168.1.x/24 network
You send Unicasts to all IPs in range 192.168.1.1-192.168.1.254, and listen to response.
That's the way LAN Peer Scanner plugin for Azureus/Vuze works
I attached screenshot showing options / "Scan Now!" button.

It's also quite useful if you already know IP addresses of Local Seeders (say, paste it from Text file with list of allIPs).
You just paste the list, scan known IPs, and get all those IPs injected to the list of seeders/sources.

Revision history for this message
Vadim Plessky (v-plessky) wrote :

http://wiki.vuze.com/w/Lan_Peer_Scanner

Lan Peer Scanner

LAN Peer Scanner searches your local area network (LAN) by enumerating all IPs via UDP unicast for peers that have the same plugin installed for data you need. If one or more such peers are found, it automatically downloads from this peer directly via LAN, resulting in a usually much higher download rate.

This is meant as an alternative to the built-in lan peer finder plugin which automatically finds all azureus instances within the local broadcasting segment via udp multicast in case multicast is not available.

Revision history for this message
Vadim Plessky (v-plessky) wrote :

Just found via Google that Transmission had commit about 11 days ago for LPD.

https://trac.transmissionbt.com/browser/trunk/libtransmission/tr-lpd.c?rev=10635

It closed this ticket:
Local Peer Discovery protocol implementation
https://trac.transmissionbt.com/ticket/3060

***
Revision 10635, 19.6 KB checked in by charles, 11 days ago (diff)
(trunk) #3060 "Local Peer Discovery" -- in the code, rename LDS as LPD for Local Peer Discovery

/**
52 * @brief Local Peer Discovery
53 * @file tr-lpd.c
54 *
55 * This module implements the Local Peer Discovery (LPD) protocol as supported by the
56 * uTorrent client application. A typical LPD datagram is 119 bytes long.
57 *
58 * $Id$
59 */
60
61 static void event_callback( int, short, void* );
62
63 static int lpd_socket; /**<separate multicast receive socket */
64 static int lpd_socket2; /**<and multicast send socket */
65 static struct event lpd_event;
66 static tr_port lpd_port;
67
68 static tr_torrent* lpd_torStaticType UNUSED; /* just a helper for static type analysis */
69 static tr_session* session;
70
71 enum { lpd_maxDatagramLength = 200 }; /**<the size an LPD datagram must not exceed */
72 const char lpd_mcastGroup[] = "239.192.152.143"; /**<LPD multicast group */
73 const int lpd_mcastPort = 6771; /**<LPD source and destination UPD port */
74 static struct sockaddr_in lpd_mcastAddr; /**<initialized from the above constants in tr_lpdInit */

Changed in qbittorrent:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.