rembo10 / headphones

Automatic music downloader for SABnzbd
GNU General Public License v3.0
3.38k stars 601 forks source link

No Jackett / Torznab provider able to send torrent to Transmission. 504 Gateway Time-out #3154

Open ChaosBlades opened 5 years ago

ChaosBlades commented 5 years ago

Getting below error sending torrent to Transmission.

2018-10-16 16:34:31 DEBUG   Server responded with message: 504 Gateway Time-out
                                nginx/1.10.3 (Ubuntu)
2018-10-16 16:34:31 ERROR   Request raise HTTP error with status code 504 (remote server error).
2018-10-16 16:34:31 DEBUG   Response status code 504 is not white listed, raised exception
2018-10-16 16:33:30 DEBUG   Requesting URL via POST method: http://192.168.1.125:80/transmission/rpc
2018-10-16 16:33:30 INFO    Sending torrent to Transmission

-- The settings I am using works just fine in Sonarr, Radarr, and Lidarr running on the same VM as Headphones. Also on my Windows PC with Transmission Remote GUI. -- If I remove the Transmission User/Pass I get authentication error. So it is connecting? -- Tried removing port 80, which is the same settings that was working last month when I had Headphones in a FreeNAS jail. Fired up old jail and it isn't working anymore either.

Issue with Headphones?

ChaosBlades commented 5 years ago

Here is the error from nginx.

2018/10/16 16:34:30 [error] 1068#1068: *527 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.130, server: 192.168.1.125, request: "POST /transmission/rpc HTTP/1.1", upstream: "http://127.0.0.1:9091/transmission/rpc", host: "192.168.1.125"

ChaosBlades commented 5 years ago

This is a Jackett / Torznab issue. I set up Transmission on Windows and had a similar issue. Just switched over to the built-in rutracker and it works. I'll look into it more tomorrow but Sonarr, Radarr, and Lidarr all only use Jackett / Torznab exclusively so the issue may still be on Headphones end. Like I said, I'll test more tomorrow.

ChaosBlades commented 5 years ago

Can confirm that No Jackett / Torznab providers are working. I see no errors in Jackett logs and no other application that uses Jackett has any issues. Let me know if you need any more information from me as I am not sure what else I can provide.

Rumbles commented 5 years ago

I have the same issue, torrents from other sources seem to work ok, but not from Jackett, as a workaround, I set transmission to use a watchdir and set headphones to save the file to a blackhole

Not ideal, but it's working again now

ChaosBlades commented 5 years ago

Still not working for me, 504 (remote server error) in Headphones logs. If I click on the torrent link in the Headphones logs it downloads just can't send it to Transmission.

AdeHub commented 5 years ago

Try the develop branch and if your Jackett indexer Download link is pointing to iTorrents and it's hanging,then change to magnet

Edit: Now in master

ChaosBlades commented 5 years ago

Updated, disabled all built-in trackers and checked the following Jackett providers.

Metal Tracker > torrent file > 504 (link to the torrent in logs downloads torrent file without delay)

LimeTorrents > magnet > "Making sure we can download the chosen result" then requests URL then does nothing according to debug logs (Jackett link in logs works without issue if opened in another tab)

ruTracker > torrent > 504 (link to the torrent in logs downloads torrent file without delay)

isohunt2 > magnet > "Making sure we can download the chosen result" then requests URL then does nothing according to debug logs (Jackett link in logs works without issue if opened in another tab)

TPB (thepiratebay10.org) > magnet > works instantly

1337x > magnet > "Making sure we can download the chosen result" then requests URL then does nothing according to debug logs (Jackett link in logs works without issue if opened in another tab)

RockBox > torrent file > 504 (link to the torrent in logs downloads torrent file without delay)

AdeHub commented 5 years ago

Can you post debug logs for 1337x from when the search starts

ChaosBlades commented 5 years ago

Like I said it just requests the link then nothing. The link works too if I open it in another tab.

2019-01-02 17:37:23 DEBUG   Checking download folder finished.
2019-01-02 17:37:23 DEBUG   Checking download folder for completed downloads (only snatched ones).
2019-01-02 17:35:19 DEBUG   Requesting URL via GET method: http://192.168.1.130:9117/dl/1337x/?jackett_apikey=p2vz6x73wq0f7klicjkg66jwfylq25cr&path=Q2ZESjhLR2VGekU0c1NkTGthdF9BbEl2NUFmLUdMcWpiVG5XWHRua3dUOHNnZV9FNTFlY3NwSkxPOFVhcENrQ0JBMTg1RWtUdkI0V19Da0ZLaE1icmk0VVRkaTVKM2VlS3N3QTM0UlZ5ZW9pbUtrY3lQY3dfczRFQVJfTm4wVVJ2cTZIc3lDVkl0T29qcE1LaW9wdlRIWm5CbUlDSUNONHFsZTBad3RTYmt1aXZDVWNSQm1ZS200Ykw2VlFycmd2VWdaOUVNT3RmWTB5VVBsX21VRU1OU3pQaTFv&file=Amorphis+-+Queen+Of+Time+%28Limited+%2B+Japan+Edition%29
2019-01-02 17:35:19 INFO    Making sure we can download the chosen result
2019-01-02 17:35:00 DEBUG   Checking if 'censored' is in search result: 'Amorphis Queen Of Time 2018ak'

Edit: You said when the search starts my bad.

2019-01-02 17:54:13 DEBUG   Requesting URL via GET method: http://192.168.1.130:9117/dl/1337x/?jackett_apikey=p2vz6x73wq0f7klicjkg66jwfylq25cr&path=Q2ZESjhLR2VGekU0c1NkTGthdF9BbEl2NUFlVERqbDhYT3RsVE9XdmE1aFpNY0NmMFZ1S1g0WEg3VGtZWk80RU1mVmhhRVZUcHpLM2FMLXE0ai01TWNkVlJfZFhiYmFuX1RpMWtCYUhPUVNJNXRJZkhMWVB1ajBHS0NIRS1haHVIeUtWWnozdmRJV19DbEdsWkF0RlNKME8wNURoeGNybW5PdEstdmdXRVNoRWM2ZUVNU1EzYWZtTW0xMXJKby1lLVRiRldLN0FnNzVBZWpQeDZzMEZQdm5NRlJF&file=Amorphis+-+Queen+Of+Time+%28Limited+%2B+Japan+Edition%29
2019-01-02 17:54:13 INFO    Making sure we can download the chosen result
2019-01-02 17:54:02 DEBUG   Checking if 'censored' is in search result: 'Amorphis Queen Of Time 2018ak'
2019-01-02 17:54:02 DEBUG   Checking if 'edited' is in search result: 'Amorphis Queen Of Time 2018ak'
2019-01-02 17:54:02 DEBUG   Checking if 'clean' is in search result: 'Amorphis Queen Of Time 2018ak'
2019-01-02 17:54:02 DEBUG   Checking if 'censored' is in search result: 'Amorphis Queen Of Time (Limited + Japan Edition)'
2019-01-02 17:54:02 DEBUG   Checking if 'edited' is in search result: 'Amorphis Queen Of Time (Limited + Japan Edition)'
2019-01-02 17:54:02 DEBUG   Checking if 'clean' is in search result: 'Amorphis Queen Of Time (Limited + Japan Edition)'
2019-01-02 17:54:02 DEBUG   Checking if 'censored' is in search result: 'Amorphis Queen Of Time [Limited E] (2018) [24 48 FLAC]'
2019-01-02 17:54:02 DEBUG   Checking if 'edited' is in search result: 'Amorphis Queen Of Time [Limited E] (2018) [24 48 FLAC]'
2019-01-02 17:54:02 DEBUG   Checking if 'clean' is in search result: 'Amorphis Queen Of Time [Limited E] (2018) [24 48 FLAC]'
2019-01-02 17:54:02 INFO    Found Amorphis - Queen Of Time 2018ak. Size: 116.0 MB
2019-01-02 17:54:02 INFO    Found Amorphis - Queen Of Time (Limited + Japan Edition). Size: 172.0 MB
2019-01-02 17:54:02 INFO    Found Amorphis - Queen Of Time [Limited E] (2018) [24-48 FLAC]. Size: 919.0 MB
2019-01-02 17:54:00 DEBUG   Requesting URL via GET method: http://192.168.1.130:9117/api/v2.0/indexers/1337x/results/torznab/
2019-01-02 17:54:00 INFO    Parsing results from Jackett_1337x using search term: Amorphis Queen of Time
2019-01-02 17:54:00 DEBUG   Using search term: Amorphis Queen of Time
2019-01-02 17:54:00 INFO    Searching for "Amorphis - Queen of Time"
AdeHub commented 5 years ago

Are you on the latest version of headphones?

Do you get anything in the Jackett logs with Enhanced logging?

ChaosBlades commented 5 years ago

Yes, as stated before I updated once you pushed dev to master 2 days ago. Just checked Jackett debug logs and see no errors or anything out of the ordinary. Checked this once before when I originally posted. Would like to point out again that Sonarr and Radarr all work fine and Jackett, Sonarr, Radarr, and Headphones are all on the same Ubuntu Server virtual machine. Transmission is on it own VM. Also tested a Transmission install on Windows and Sonarr and Radarr both worked fine. Headphones had the same issue as it does now.

Edit: Also Lidarr worked fine when I was playing around with that when I originally posted.

AdeHub commented 5 years ago

I get the same issue with 1337x if not set to magnet, it times out after about 5 mins and does give an error. If I set it to magnet then all ok

ChaosBlades commented 5 years ago

It is set to magnet as was mentioned 3 days ago. Just double checked Jackett and the link in the logs opens as a magnet. Besides the main want is to have Metal Tracker and Rock Box working which are both torrent only sites.

AdeHub commented 5 years ago

Metal Tracker is working for me, got logs for that?

ChaosBlades commented 5 years ago

Same as the logs in OP.

2019-01-04 17:40:04 | DEBUG | Server responded with message: 504 Gateway Time-out nginx/1.14.0 (Ubuntu)
2019-01-04 17:40:04 | ERROR | Request raise HTTP error with status code 504 (remote server error).
2019-01-04 17:40:04 | DEBUG | Response status code 504 is not white listed, raised exception
2019-01-04 17:39:04 | DEBUG | Requesting URL via POST method: http://192.168.1.125:80/transmission/rpc
2019-01-04 17:39:04 | DEBUG | Retrying Transmission request with new session id
2019-01-04 17:39:04 | DEBUG | Requesting URL via POST method: http://192.168.1.125:80/transmission/rpc
2019-01-04 17:39:04 | INFO | Sending torrent to Transmission
2019-01-04 17:39:04 | INFO | Found best result from Jackett_metaltracker: Amorphis - Queen Of Time (Japan Edition) - 172.0 MB
2019-01-04 17:39:03 | DEBUG | Requesting URL via GET method: http://192.168.1.130:9117/dl/metaltracker/?jackett_apikey=p2vz6x73wq0f7klicjkg66jwfylq25cr&path=Q2ZESjhLR2VGekU0c1NkTGthdF9BbEl2NUFjcVFXcHpSa2xIc1lXQ1FmdGNVdllYbmhmMVRubUE3UjZZWnFKSjNlQXBNazVTd3doNVNmbkNSbmlmMFkzTld3VlAycUxYbE1IdlFIcnp6STZBaWJPbWQ0T1YzM3lMREtEZXhpMEZHVFJzcEtWLUNXMlF0a29pOVRlemYxQXZ4bnlmR0tIaU0tZF96WnpHcjQwSXM5ei1Xb2oxM0FWNlRsRGVBUlh3cmxYLVN3&file=Amorphis+-+Queen+Of+Time+%28Japan+Edition%29
2019-01-04 17:39:03 | INFO | Making sure we can download the chosen result
AdeHub commented 5 years ago

Not sure what your issue is but have updated the headphones Requests lib in develop if you want to give that a try

ChaosBlades commented 5 years ago

Just wanted to give an update. I just did a lot of testing and this has something to do with my Transmission being in a separate VM behind a Split Tunnel VPN. Either some setting is specifically blocking Headphones or Headphones use of Jackett differs in some way to how Sonarr and its clones do it that does not work through a Split Tunnel VPN. When I said setting up Transmission on Windows also didn't work before that was because of a configuration issue on my part. I can get this to work in every scenario but when Transmission is behind a Split Tunnel VPN.

Edit: Switching to Develop Branch did not resolve the issue.

Rumbles commented 5 years ago

In my case, transmission, jackett and headphones are running on the same Linux host and see this issue

SergeantPanda commented 4 years ago

I am having the same issue on the newest version. I am sending to a Deluge client that is on a VM. It works perfectly fine for TPB and others but does not work for anything on Jackett.

I can use the same links from Jackett in Sonarr and Radarr without any problems.

One thing I did find interesting in my testing is when I was using "localhost" as the hostname for Jackett, the links that Headphones created in the log files would not work. As soon as I changed from "localhost" to the pc name (ubuntuserver) or 127.0.0.1 the links actually worked.

Headphones never progresses after the GET request.

2020-02-29 22:29:18 DEBUG   Requesting URL via GET method: http://ubuntuserver:9117/dl/limetorrents/?jackett_apikey=ug32ubd5u7ktxab3lewfbkcehcj32753&path=Q2ZESjhNMGgwSk1EX2VaTWpVLXA1T0lROU42Wm9tUzJ1QVlYSU9vSlNzcEozV2tMTGlERXBHM2hKTUhPUkZyNDVvMmVoeG5Ybk5UY3Yyb3hDck50OXJ3Tzh1eTNTQ05UR2tsNnRKX1duVXVreU0tZ2ttTEE0MzdaQ0Q4UkFGVzFHeGVlZ3dRX01kQ3l3OG5VSGtaUkQ4MWRiQWw5cW5QakR3SHZlanl5V2tKNkdfZmdJYU1nNmM3a29QaEEtQkxBUUtxSk9hN3ZwYUJLb3NsVzUtYjh6M2E4NzZTQnpQaTd5cXVUbHV6LUE5aDI1QzUt&file=Ed+Sheeran+-+X+-+2014+%5BFLAC%5D+%5BRLG%5D
2020-02-29 22:29:18 INFO    Making sure we can download the chosen result

It may be worth mentioning that I did try the black-hole method but it never worked with that either (not surprising since it doesn't get past the GET request).