Page 1 of 2

Add a new peer not responding

Posted: Thu Nov 12, 2015 3:31 am
by dwight
I have two qbittorrent 3.2.5 installations (windows) connected two separate external internet connections and a shared LAN connection.  I am attempting to get the two clients to talk to each other and share pieces.

They connect sometimes and I see each other's IP addresses on the peers list, but, they won't transfer.

There are a lot of peers on this torrent and very few seeders.  I understand the BitTorrent rules are complicated,  and there are probably a lot of things that could be causing the problem.  What are some of the things I can check?

Is there any logging I can enable to possibly see what's going on?

Re: Add a new peer not responding

Posted: Thu Nov 12, 2015 9:09 am
by Peter
I am not sure if you can direct add peers if with private torrents... but FIXME, not sure.
There are patched clients for this though, that ignore this flag.
(Which clients are forbidden to use on most private trackers and you can get banned for using them.)


Other option is to simply use BTSync on your local network, and use that for the local transfer...
That could work... IMO.
OR, you could enable the in-built tracker in qBittorrent on one of the machines, and use that tracker.

Re: Add a new peer not responding

Posted: Thu Nov 12, 2015 9:44 am
by ciaobaby
They connect sometimes and I see each other's IP addresses on the peers list, but, they won't transfer.
Internal or external?
  I understand the BitTorrent rules are complicated
Rules??
Is there any logging I can enable to possibly see what's going on?
View -> Execution log

https://github.com/qbittorrent/qBittorr ... ed'-issues
And for your set up screen shots of the Connection, Bittorrent and Advanced panels from Options, along with (if possible) a drawing of your LAN topography. Just lines and blocks annotated  with internal IPs will do, including the WAN (Internet) connections

Re: Add a new peer not responding

Posted: Thu Nov 12, 2015 1:18 pm
by dwight
[quote="Peter"]
(Which clients are forbidden to use on most private trackers and you can get banned for using them.)
[/quote]

These are in fact torrents marked at private, I've enabled the local tracker inside qbittorrent and added to each installation.  I read that should get around the private issue, right?

[quote="Peter"]
Other option is to simply use BTSync on your local network, and use that for the local transfer...
[/quote]
I've looked at https://www.getsync.com/, I've got gigabit Ethernet between the two machines, a simple file copy works fine, the problem is neither copy of the file is complete.  Client A has some piece and client B has some.  Between the two of them, they have all the pieces.  I've copied the files at the OS level to vuze, which shows which pieces are complete.


[quote="Peter"]
OR, you could enable the in-built tracker in qBittorrent on one of the machines, and use that tracker.
[/quote]

It does not seem to be helping.

Re: Add a new peer not responding

Posted: Thu Nov 12, 2015 2:48 pm
by dwight
ciaobaby wrote:
They connect sometimes and I see each other's IP addresses on the peers list, but, they won't transfer.
Internal or external?
When I enter the addresses, I always use the local addresses.  It sometimes discovers the external addresses which have fair connection between them, but they won't exchange information over the external addresses either. I've not gone to the extent to get all the routing rules in place so that the external addresses route through internals.
ciaobaby wrote:
  I understand the BitTorrent rules are complicated
Rules??
Not rules from and end users perspective, rules as far as when a client does which communication with which other client.  Understanding how it is intended to work could help me come up with a solution.

ciaobaby wrote:
Is there any logging I can enable to possibly see what's going on?
View -> Execution log
The execution log tells me about problems inserting into UPNP, the rest it just the same status messages over and over.  I'm looking for something that tells me, it knows about a specific peer, but has chosen not to communicate for, then specify what the reason is. 


If there is a way to get more information to show up in the execution log, that would be wonderful.
ciaobaby wrote: https://github.com/qbittorrent/qBittorr ... ed'-issues
And for your set up screen shots of the Connection, Bittorrent and Advanced panels from Options, along with (if possible) a drawing of your LAN topography. Just lines and blocks annotated  with internal IPs will do, including the WAN (Internet) connections
I didn't see anything obvious on the faq that applied, I'll do up a drawing tomorrow, I'm in Asia.

Re: Add a new peer not responding

Posted: Thu Nov 12, 2015 7:00 pm
by ciaobaby
Not rules from and end users perspective, rules as far as when a client does which communication with which other client.  Understanding how it is intended to work could help me come up with a solution.
The protocol you mean,
https://wiki.theory.org/BitTorrentSpecification
The execution log tells me about problems inserting into UPNP
Well that probably explains the problem then.

Re: Add a new peer not responding

Posted: Thu Nov 12, 2015 10:14 pm
by Switeck
[quote="dwight"]They connect sometimes and I see each other's IP addresses on the peers list, but, they won't transfer.

There are a lot of peers on this torrent and very few seeders.[/quote]Do these 2 local-to-each-other BT clients have upload slots global and per torrent set high enough to guarantee they'll try to upload to each other?

If your per torrent connection max is set to 50 and upload slots per torrent (or global) is set to 4...and you're connected to 20+ other peers besides the one you want to upload to, you probably won't upload to that one peer except very rarely.

Re: Add a new peer not responding

Posted: Fri Nov 13, 2015 7:08 am
by dwight
ciaobaby wrote:
Not rules from and end users perspective, rules as far as when a client does which communication with which other client.  Understanding how it is intended to work could help me come up with a solution.
The protocol you mean,
https://wiki.theory.org/BitTorrentSpecification
Not exactly.  But the difference is in selection of words.  You understand my meaning, which is the important part.  A protocol defines how what goes in the individual packets that go back and forth and how they are transmitted.  I want to know more about the decisions of when the client decides to take action or not.

Protocol (Computer): a set of rules governing the format of messages that are exchanged between computers.
Communications protocol: a defined set of rules and regulations that determine how data is transmitted in telecommunications and computer networking

But, once again, you understand my meaning and I appreciate your response.
ciaobaby wrote:
The execution log tells me about problems inserting into UPNP
Well that probably explains the problem then.
I was not clear, it's my fault for not being more verbose.    Point 1, when it did tell me it did not insert to UPNP, I resolved the issue by unloading the application, then reloading it.  Point 2, UPNP failures would not impact explicit local subnet communication, I'm telling it what IP address and what port to use.  UPNP allows for local discovery and external port mapping.   

Re: Add a new peer not responding

Posted: Fri Nov 13, 2015 7:13 am
by dwight
[quote="Switeck"]
[quote="dwight"]They connect sometimes and I see each other's IP addresses on the peers list, but, they won't transfer.

There are a lot of peers on this torrent and very few seeders.[/quote]Do these 2 local-to-each-other BT clients have upload slots global and per torrent set high enough to guarantee they'll try to upload to each other?

If your per torrent connection max is set to 50 and upload slots per torrent (or global) is set to 4...and you're connected to 20+ other peers besides the one you want to upload to, you probably won't upload to that one peer except very rarely.
[/quote]

I've seen where both computers are not connected to any peers, I've paused all other torrents, so both PC's have only one torrent active, and neither one has any active peers.  I perform add a new peer on both sides, specifying IP and port, sometimes it flashes in the panel, sometimes not.  It could be just too fast to see though.

Re: Add a new peer not responding

Posted: Fri Nov 13, 2015 11:42 am
by Switeck
From what I've seen, qBitTorrent tends to show ip:port of peers it's trying for a couple seconds -- no response/timing out ones tend to take even longer to clear out.

If the peer connection fails to be made in the first place, something is blocking it...or the wrong address + port is being tried!

BT clients for the most part don't try to hang onto peer connections -- firewall software may decide it didn't like a packet tossed between them and break it, very brief overload can cause a disconnect, or ISP active interference assuming the connection passes through a point the ISP manages. (This can include modem-routers customers rent!)
Between 2 ips on the same LAN, introduced to each other manually via their LAN ip + port...a cause of failure can be anything from antispyware/antivirus software with "internet protection" (read poorly-programmed firewall that interferes with nearly everything) to BT clients that timeout connections for no apparent reason.
I've seen peer exchange (PEX) flood bugs in BT clients cause them to auto-ban the other peer/seed. These won't come back unless they're restarted or at least until you manually clear bans.

The automatic retry time for a peer is typically 1 minute or more. If the retry fails maybe 3-5 times in a row, it is proper to have longer delays before retrying it. Retrying the same ip:port >1000 times a day has a bandwidth cost even if the other side never replies.

One end may expect incoming encrypted connections while the other end may typically only make unencrypted connections outgoing.
There cannot be 2 connections between 2 LAN computers using the same ip+port addresses for both ends. If you have a single outgoing port set, the first attempt may block all other attempts until it clears from networking memory.
A high half open connection limit can mean a torrent's max connection limit may be hit by outgoing connection attempts that are unlikely to succeed ...yet blocking any potential incoming connections that would otherwise succeed. qBT has a peer list memory that can persist even across program shutdowns. Even if internet access is blocked, it may attempt to connect to impossible-to-reach addresses and not allow a LAN address through till these others time out.

Lastly, there may be additional qBitTorrent limitations or bugs that cause connection failures or prevent connections entirely.

Re: Add a new peer not responding

Posted: Fri Nov 13, 2015 12:45 pm
by dwight
[quote="Switeck"]
BT clients for the most part don't try to hang onto peer connections -- firewall software may decide it didn't like a packet tossed between them and break it
[/quote]

My specific problem is not network or firewall relate.  These are actually 2 virtual machines on the same host, and started as exact copies.  Other torrents shared between the two machines connect and send all their information correctly, right now, I'm down to just about 20 files on 2 different torrents that are having problems, meaning the % complete is not exact.
 

Re: Add a new peer not responding

Posted: Fri Nov 13, 2015 2:47 pm
by Switeck
A piece can only be shared by a peer if it is completely downloaded AND passes its hash check. Each piece has its own hash value to know if it's correct -- all the hash values of all the pieces of a torrent tends to be what makes .torrent files as large as they are. (fewer pieces = smaller .torrent file)

So the 2 virtual machines may have different partial pieces done, resulting in a percent complete difference.

qBitTorrent doesn't seem to be aggressiveness enough at completing unfinished pieces, based on my tests.

Re: Add a new peer not responding

Posted: Fri Nov 13, 2015 2:55 pm
by dwight
[quote="Switeck"]
A piece can only be shared by a peer if it is completely downloaded AND passes its hash check. Each piece has its own hash value to know if it's correct -- all the hash values of all the pieces of a torrent tends to be what makes .torrent files as large as they are. (fewer pieces = smaller .torrent file)

So the 2 virtual machines may have different partial pieces done, resulting in a percent complete difference.

qBitTorrent doesn't seem to be aggressiveness enough at completing unfinished pieces, based on my tests.
[/quote]

That certainly things a lot, some of the percentages were close.  However some of the percentages were very off, 25% on #1 and 95%. 

I created a 3rd virtual, set all of them to connect to each other and it successfully shared back and forth.    The remaining differences are small which can be explained by partial pieces.

Re: Add a new peer not responding

Posted: Fri Nov 13, 2015 3:04 pm
by Switeck
Were the last "troublesome" torrents really busy or have some other weird characteristics? (4 MB piece size, 1000's of files in the torrent, etc?)

Re: Add a new peer not responding

Posted: Sat Nov 14, 2015 4:34 pm
by dwight
[quote="Switeck"]
Were the last "troublesome" torrents really busy or have some other weird characteristics? (4 MB piece size, 1000's of files in the torrent, etc?)
[/quote]
500GB torrent, 80 files.  16MB piece size.

I don't know how to tell how busy the torrent is, when I add up all the peers found on all of the trackers, it's about 150, my guess is that's not a unique count as peers will register on the same trackers.

Edit: GB not MB