Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5610 closed Bug (invalid)

Fail to redirect tracker URL

Reported by: svalx Owned by:
Priority: Normal Milestone: None Set
Component: Transmission Version: 2.82
Severity: Normal Keywords: retracker, redirect, URL, Announce error, tracker
Cc:

Description

My ISP provide retracker on http://retracker.coltel.ru:2710/ and redirect incoming connections on http://retracker.local:80/ to this URL. Some torrents include http://retracker.local:80 in it's tracker list, but redirection is fail: "Announce error: Could not connect to tracker". If I explicitly specify tracker URL then all OK. retracker.local and retracker.coltel.ru resolves to a same IP, the difference is only in the ports. Browser successfully redirecting from retracker.local:80 to retracker.coltel.ru:2710. Other torrent clients (uTorrent, Vuze) operating according to this scheme without problems.

Change History (5)

comment:1 Changed 8 years ago by rb07

Transmission already has "follow redirection" enabled, so this is probably not a bug(2). In detail it uses http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTFOLLOWLOCATION, with no limit.

Your problem is probably build specific(1). In particular libcurl could be the problem.

In fact, you could test with curl just as you tested with the Web browser. Use something like

curl --trace-ascii - http://retracker.coltel.ru/announce

to see the full exchange. The test for me shows it returns code 301, and then curl issues another request to the redirected address.

Perhaps the problem is with the link you are using, retracker.local is not the same as retracker.coltel.ru (unless you, or your ISP, also changed your DNS resolution, either changing /etc/hosts, or the configuration of your DNS server).

(1) You need to provide more information, which client and OS? pre-built, or build by yourself? which version of curl?

(2) The Forum is a better place to discuss problems which are probably not a bug.

comment:2 Changed 8 years ago by svalx

  • Resolution set to invalid
  • Status changed from new to closed

This is not a bug. I had issue with resolve "retracker.local" - avahi-daemon on openSUSE intercept all *.local query. This fixed by editing /etc/nsswitch.conf - remove [NOTFOUND=return] from "hosts: ..." string.

comment:3 follow-up: Changed 8 years ago by svalx

Thank you very much rb07! You're right, it's may be not a Transmission bug. My environment: openSUSE Tumbleweed x86_64, Transmission 2.82-2.1.3 from official repo, curl and libcurl4 7.35.0-109.1 from official repo also. Is the following curl trace may tell anything about my issue? You received same trace?

~> curl --trace-ascii - http://retracker.local/announce
== Info: Adding handle: conn: 0x2451ad0
== Info: Adding handle: send: 0
== Info: Adding handle: recv: 0
== Info: Curl_addHandleToPipeline: length: 1
== Info: - Conn 0 (0x2451ad0) send_pipe: 1, recv_pipe: 0
== Info: About to connect() to retracker.local port 80 (#0)
== Info:   Trying 83.167.65.174...
== Info: Connected to retracker.local (83.167.65.174) port 80 (#0)
=> Send header, 87 bytes (0x57)
0000: GET /announce HTTP/1.1
0018: User-Agent: curl/7.32.0
0031: Host: retracker.local
0048: Accept: */*
0055:
<= Recv header, 32 bytes (0x20)
0000: HTTP/1.1 301 Moved Permanently
== Info: Server nginx/1.2.1 is not blacklisted
<= Recv header, 21 bytes (0x15)
0000: Server: nginx/1.2.1
<= Recv header, 37 bytes (0x25)
0000: Date: Sat, 15 Feb 2014 06:06:50 GMT
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 21 bytes (0x15)
0000: Content-Length: 184
<= Recv header, 24 bytes (0x18)
0000: Connection: keep-alive
<= Recv header, 52 bytes (0x34)
0000: Location: http://retracker.coltel.ru:2710/announce
<= Recv header, 2 bytes (0x2)
0000:
<= Recv data, 184 bytes (0xb8)
0000: <html>
0008: <head><title>301 Moved Permanently</title></head>
003b: <body bgcolor="white">
0053: <center><h1>301 Moved Permanently</h1></center>
0084: <hr><center>nginx/1.2.1</center>
00a6: </body>
00af: </html>
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.2.1</center>
</body>
</html>
== Info: Connection #0 to host retracker.local left intact
~> curl --location --trace-ascii - http://retracker.local/announce
== Info: Hostname was NOT found in DNS cache
== Info:   Trying 83.167.65.174...
== Info: Connected to retracker.local (83.167.65.174) port 80 (#0)
=> Send header, 87 bytes (0x57)
0000: GET /announce HTTP/1.1
0018: User-Agent: curl/7.35.0
0031: Host: retracker.local
0048: Accept: */*
0055:
<= Recv header, 32 bytes (0x20)
0000: HTTP/1.1 301 Moved Permanently
== Info: Server nginx/1.2.1 is not blacklisted
<= Recv header, 21 bytes (0x15)
0000: Server: nginx/1.2.1
<= Recv header, 37 bytes (0x25)
0000: Date: Sat, 15 Feb 2014 06:42:17 GMT
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 21 bytes (0x15)
0000: Content-Length: 184
<= Recv header, 24 bytes (0x18)
0000: Connection: keep-alive
<= Recv header, 52 bytes (0x34)
0000: Location: http://retracker.coltel.ru:2710/announce
<= Recv header, 2 bytes (0x2)
0000:
== Info: Ignoring the response-body
<= Recv data, 184 bytes (0xb8)
0000: <html>
0008: <head><title>301 Moved Permanently</title></head>
003b: <body bgcolor="white">
0053: <center><h1>301 Moved Permanently</h1></center>
0084: <hr><center>nginx/1.2.1</center>
00a6: </body>
00af: </html>
== Info: Connection #0 to host retracker.local left intact
== Info: Issue another request to this URL: 'http://retracker.coltel.ru:2710/announce'
== Info: Hostname was NOT found in DNS cache
== Info:   Trying 83.167.65.174...
== Info: Connected to retracker.coltel.ru (83.167.65.174) port 2710 (#1)
=> Send header, 96 bytes (0x60)
0000: GET /announce HTTP/1.1
0018: User-Agent: curl/7.35.0
0031: Host: retracker.coltel.ru:2710
0051: Accept: */*
005e:
== Info: HTTP 1.0, assume close after body
<= Recv header, 24 bytes (0x18)
0000: HTTP/1.0 404 Not Found
<= Recv header, 2 bytes (0x2)
0000:
<= Recv data, 0 bytes (0x0)
== Info: Closing connection 1

In second trace, with --location option, I see successful redirection to right URL. This may suggests that curl all right ...

comment:4 in reply to: ↑ 3 ; follow-up: Changed 8 years ago by rb07

Replying to svalx:

[Does] the following curl trace may tell anything about my issue? You received same trace?

Are you still looking for answers, your #comment:2 seems to indicate that you found a solution.

You received same trace?

Similar, but I can't use retracker.local, that won't resolve on my DNS (unless I change the configuration).

I didn't need to use the --location option, I guess following redirections is the default, and I get a trace like your second test without using the extra option.

comment:5 in reply to: ↑ 4 Changed 8 years ago by svalx

Replying to rb07:

Are you still looking for answers, your #comment:2 seems to indicate that you found a solution.

Yes, i found solution, thank you. My comment #3 has been sent early then comment #2. Moderation swapped them. There was only one problem with scrape requests, I described it on the forum: https://forum.transmissionbt.com/viewtopic.php?f=2&t=15671

Note: See TracTickets for help on using tickets.