This forum has been archived. All content is frozen. Please use KDE Discuss instead.

"Invalid data from tracker"

Tags: None
(comma "," separated)
mko
Registered Member
Posts
9
Karma
0

"Invalid data from tracker"

Tue Dec 19, 2006 8:53 am
Hi!

Whenever I try to start downloading a torrent from a specific tracker with ktorrent, the following thing happens:
In ktorrent it "announces" and then it says "Invalid data from tracker".

As that is not very accurate, I checked the log file, which did not really help.

Then I used wireshark to look at the packets themselves:

This is my announce packet:
GET /tracker/****/announce?peer_id=-KT21B1-696319021551&port=<myport>&uploaded=0&downloaded=0&left=397790310&compact=1&numwant=100&key=1977068586&event=started&info_hash=%3cV%ed%90%e2%0d%edz%be%19%ff%f3%ab%10%91%83%b2P%22%3f HTTP/1.1\
User-Agent: ktorrent/2.1beta1\r\n
Accept: text/plain\r\n
Accept-Encoding: x-gzip, x-deflate, gzip, deflate\r\n
Host: <thehost>\r\n
Connection: Keep-Alive\r\n
\r\n

This is what I get back:
HTTP/1.1 406 Not Acceptable\r\n
Date: Mon, 18 Dec 2006 14:05:37 GMT\r\n
Server: Apache/1.3.34 (Unix) PHP/4.4.2\r\n
Alternates: {"tracker.php" 1 {type application/x-httpd-php} {length 19941}}\r\n
Keep-Alive: timeout=1, max=299\r\n
Connection: Keep-Alive\r\n
Transfer-Encoding: chunked\r\n
Content-Type: text/html; charset=iso-8859-1\r\n
\r\n

With the following HTML-Page:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>406 Not Acceptable</TITLE>
</HEAD><BODY>
<H1>Not Acceptable</H1>
An appropriate representation of the requested resource /tracker/****/announce could not be found on this server.<P>
Available variants:
<ul>
<li><a href="tracker.php">tracker.php</a> , type application/x-httpd-php
</ul>
<HR>
<ADDRESS>Apache/1.3.34 Server Port 80</ADDRESS>
</BODY></HTML>


Now, this doesn't mean very much to me.
Can somebody tell me, what's wrong?
Is it ktorrents fault or the trackers fault? And how can it be fixed?

This does only happen with this tracker btw...and I would hate to use another torrent client just for this site.

Thanks for input!
George
Moderator
Posts
5421
Karma
1

Tue Dec 19, 2006 3:16 pm
Can you send us a torrent which uses that specific tracker ?

Probably some parameter they don't like.
imported4-Ivan
Registered Member
Posts
819
Karma
0

Tue Dec 19, 2006 6:09 pm
Remember the problem with OiNK tracker recently? If I remember correctly they had the problem with the field "Accept: text/plain\r\n ", apparently something is messed up with Apache default config. They fixed it and everything is working fine since.

Problem is, I don't remember what they changed neither do I remember who changed it so we can ask...

Anyway, if this is the same problem, you should contact their admin and explain the problem.
mko
Registered Member
Posts
9
Karma
0

Wed Dec 20, 2006 1:29 pm
What do other clients send? Because it works fine with all other clients.

Well, let's wait and see if George can find out anything about this, I already sent him a test-torrent yesterday.
George
Moderator
Posts
5421
Karma
1

Wed Dec 20, 2006 5:14 pm
I'm looking at it this evening, got sidetracked by a linksys wireless card which doesn't want to work on a windows box.
mko
Registered Member
Posts
9
Karma
0

Wed Dec 20, 2006 5:26 pm
Thank you very much! :-)
George
Moderator
Posts
5421
Karma
1

Wed Dec 20, 2006 5:48 pm
After some experimenting and comparison with the requests AZ sends, I have come to the following conclusion :

KT sends :
Accept: text/plain

AZ sends :
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2

I have modified KT to send a combination of both and then the request succeeds.

Now I think we had a bug where a tracker only accepted text/plain, I'm gonna google that topic, don't want to break anything.
George
Moderator
Posts
5421
Karma
1

Wed Dec 20, 2006 5:56 pm
OK, here is the previous topic :

http://ktorrent.org/forum/viewtopic.php ... 83b8484ec5

This is actually the interesting part :

Oh, that's easy, kTorrent is sending headers that are not included in the BitTorrent specifications. Just about any headers are accepted by this tracker except ones that have been shown to be used by cheat attempts using browsers.

Other than "text/plain", there is no reason for the client to be sending any header information in an announce.

If you can, find out what headers kTorrent is including and why.


So we have a tracker which only wants text/plain, and we have one which doesn't like this and sends back an error when we only send text/plain

I think we need to contact the site's admins, because the bittorrent spec says that a tracker should answer with text/plain as content type, so it doesn't make much sense to send something else then Accept: text/plain in the announce.
George
Moderator
Posts
5421
Karma
1

Wed Dec 20, 2006 6:12 pm
It also works if we send this :

text/plain, *; q=.2, */*; q=.2

I'm not really sure what this q=.2 means
mko
Registered Member
Posts
9
Karma
0

Wed Dec 20, 2006 6:27 pm
Well, if you can tell me what and how they should change it specifically, I can post it in their forum and tell them why, how and what.

So the tracker doesn't like when we only accept text/plain? Why?

On the other hand: Why would it "hurt" to accept */* and the other stuff?

Thanks for looking into it.
George
Moderator
Posts
5421
Karma
1

Wed Dec 20, 2006 6:34 pm
The */* seems to be the things which needs to be included for this tracker.
George
Moderator
Posts
5421
Karma
1

Wed Dec 20, 2006 6:44 pm
I did some investigations in the HTTP 1.1 RFC (page 101 if anybody is interested):

If no Accept header field is present, then it is assumed that the
client accepts all media types. If an Accept header field is present,
and if the server cannot send a response which is acceptable
according to the combined Accept field value, then the server SHOULD
send a 406 (not acceptable) response.


It seems that this server is just not following the HTTP protocol, when the server sends a valid response, it uses text/plain for the content type.

According to this snippet, if we say Accept: text/plain, the server should only send a 406 when it cannot send a response with text/plain as mimetype, but the server wants to send a response with text/plain.
imported4-Ivan
Registered Member
Posts
819
Karma
0

Wed Dec 20, 2006 9:56 pm
Ok, now I'm pretty sure this is the same error as on OiNK.
As I said, problem was in Apache config files but I don't remember exactly what.

I guess if tracker admins are informed they'll know what to do. Unless I manage to find my private messages from OiNK which mysteriously disappeared from my inbox...
mko
Registered Member
Posts
9
Karma
0

Thu Dec 21, 2006 8:34 am
Would be great if you found it...I'll get this information to them and maybe they'll know what to do...maybe not ;-)

Thanks for your help so far, would be great if you could find out what to change exactly.
jdm
Registered Member
Posts
13
Karma
0

Mon Jan 08, 2007 9:19 am
i also have the same problem........invalid data from tracker
now i am gettin this problem when i download from 4 sites private torrents.
all these torrents were working a few hours back but all of a sudden i started gettin this error.i never faced this problem in ktorrent which i have been using to download from these sites since last 3-4 months.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft