Jump to content

Tracker reply has no peers field


Recommended Posts

(sorry for my english)

I'm a co-developer of BitTorrent module for Drupal.

I have this error.

uTorrent 1.8.2 build 14458

This error appear for following tracker responses:

d8:completei0e10:downloadedi0e10:incompletei0e8:intervali1800e12:min intervali600e5:peersld2:ip9:127.0.0.17:peer_id20:-UT1820-z8Г=‚8‚VѓЅђ4:porti26573eeee

d8:completei0e10:downloadedi0e10:incompletei0e8:intervali1800e12:min intervali600e5:peerslee

Please help to understand where is the problem.

Link to comment
Share on other sites

Well, from what I can tell in the protocol descriptions found here and here, if you're going to send a list of dictionaries as the peers key, then each dictionary is supposed to contain a peer id key, not a peer_id key. Alternatively, you can reduce the size (and complexity) of the tracker response by sending a binary string representation of the IP:port combination (described in the first link) instead of a list of dictionaries.

At any rate, I'm not sure whether peer id vs peer_id would cause the error to occur, but considering the fact that you're violating the specs by sending the latter instead of the former, it wouldn't surprise me if that was the problem.

Link to comment
Share on other sites

Thanks for the answer, but unfortunately nothing changed.

Next responses raise the error:

d8:completei0e10:downloadedi0e10:incompletei0e8:intervali1800e12:min intervali600e5:peersld2:ip9:127.0.0.17:peer id20:-UT1820-z8Г=‚8‚VѓЅђ4:porti26573eeee

d8:completei0e10:downloadedi0e10:incompletei0e8:intervali1800e12:min intervali600e5:peers6: gНe

d8:completei0e10:downloadedi0e10:incompletei0e8:intervali1800e12:min intervali600e5:peers0:e

Also I have found that "downloaded" is not supported (inserted into response by accident).

I have remove it, but nothing changed.

Link to comment
Share on other sites

I solved the problem.

Actually script before send the response, send (output to output stream) bencoded "warning message" (use passkey with public tracker), then it try to send headers and the response itself, but because output has been started they already sent and php output a textual warning message to the output stream, which split whole response ("warning message" and response itself) into two parts.

Therefore uTorrent can not find the "peers". But I think that it would be better to show another error message in uTorrent for such case.

The output example:

d15:warning message63:Passkey is not needed: 9bd5f129aafd658211d3475b2e6293c8b396ff06e<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at D:\Web\htdocs\sites\bittorrent-direct\modules\bittorrent\includes\bt_common.inc:620) in <b>D:\Web\htdocs\sites\bittorrent-direct\modules\bittorrent\includes\bt_common.inc</b> on line <b>618</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at D:\Web\htdocs\sites\bittorrent-direct\modules\bittorrent\includes\bt_common.inc:620) in <b>D:\Web\htdocs\sites\bittorrent-direct\modules\bittorrent\includes\bt_common.inc</b> on line <b>619</b><br />
d8:completei0e10:incompletei0e8:intervali1800e12:min intervali600e5:peersld2:ip11:192.168.0.37:peer id20:-UT1820-z8ѓ~В§/IФK4:porti36226eeee

Link to comment
Share on other sites

The problem isn't the bencoder. The problem is that the server was appending other messages to the response -- look at the output overall posted, and you'll notice that HTML is interspersed and concatenated with multiple bencoded dictionaries. Presumably, µTorrent is reading only the first dictionary in the server response and seeing the error instead of the expected peers list, so it spits the error back.

Edit: Added missing word.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...