Jackett: Docker Jackett Unable to connect to indexer from Sonarr

Created on 28 Sep 2020  路  8Comments  路  Source: Jackett/Jackett

Jackett v0.16.1350.0
Sonarr NzbDrone.exe - Version 2.0.0.5344

Hey everyone,

I'm running docker on a windows OS and trying to hook sonarr into jackett but I keep getting the error 'Unable to connect to indexer, check the log for more details'. I'm new to this whole thing but trying to learn.

I've gone through all other reports of this error I can find and can't get past this.

Jackett container is using my Deluge network for VPN (without doing this my indexes fail their tests as my ISP blocks them) - set up with the below powershell command:

docker run --name=jackett --net=container:delugevpn -e PUID=1000 -e PGID=1000 -e TZ=Europe/London -e AUTO_UPDATE=true --restart unless-stopped linuxserver/jackett

And I mapped port 9117 in the deluge container.

I have tested their IP returns from the CLI and they seem fine. I can access Jacket from http://localhost:9117/UI/Dashboard and add indexers also fine.

Trying to add that index list to Sonarr is where I get stuck and get hit with this:

image

Checking the log from Docker gives me this:

[Warn] Torznab: Unable to connect to indexer

[v2.0.0.5344] System.Net.WebException: Error: ConnectFailure (Connection refused): 'http://localhost:9117/torznab/all/api?t=caps&apikey=myapikey' ---> System.Net.WebException: Error: ConnectFailure (Connection refused) ---> System.Net.Sockets.SocketException: Connection refused {...}

(There's much more to that error I have missed out. If its relevant let me know and I can post it up)

However, when I go to that URL in my browser, it loads fine. Sonarr is not behind a VPN so accessing the URL from my host machine should be the same as the container trying to do it...? (I think)

I have also tried the 'Copy Torznab Feeds' URLs from individual indexes (rather than using 'all') but its exactly the same thing - fails like above, but loads fine if I paste them into a browser.

I feel like I've spent a few days reading google and just clicking the test button in a hope it'll magically work, so any help in the right direction would be amazing!

Thanks

All 8 comments

I don't know anything about setting up docker Jackett etc.
But I do know that the aggregate indexer URL you set up in your Sonarr definition is incorrect.
it should be
http://localhost:9117/api/v2.0/indexers/all/results/torznab/
Also, I recommend not using the aggregate indexer. You will get far better results by defining each Jackett indexer you want to use in Sonarr directly.
In these days of cloudflare DDoS protection on some sites coming and going, as well as the upheaval of site domain changes, scene crackdowns, and server overloads, the aggregate indexer will be slow to return results, as well as all the disadvantages described in https://github.com/Jackett/Jackett#aggregate-indexers

@ngosang @ilike2burnthing any thoughts on what the issue here is? seems likely something to do with the delugevpn?

Thanks @garfield69 - I鈥檒l switch to individual indexers and steer clear or the aggregator once I can get it running then.

Just for clarity, all the delugeVPN bit is doing is providing the network for Jacketts container to ensure it sits behind a VPN so I can access the indexes. I can test the public IP and add and test indexes within Jackett, which makes me think that side of it is working fine(?). (I鈥檝e tested the Deluge network with a torrent tracker too so it鈥檚 definitely all live and working.)

Sonarr isn鈥檛 behind a VPN. and I can reach the URL for jacketts API fine from my normal browser on my windows 10 OS. All of it鈥檚 on the same host machine.

Thanks

This is likely an issue with docker set up rather than with the Jackett app.
This support site is for the Jackett app and not the docker image supported by the linuxserver.io team.
You are more likely to get the help you need from the docker community.
Consider joining the docker forum at discourse or the docker support chat at discord

Hopefully this will give you something to check - https://github.com/haugene/docker-transmission-openvpn/issues/991 (different image, but same principle)

And some extra troubleshooting or questions answered - https://github.com/haugene/docker-transmission-openvpn/issues/1006

Let us know if that resolves the issue.

You can try 2 things:

  • Map the Jackett port to the hosts -p 9117:9117 (you should mount the volumes with the Jackett configuration too) => docker run --name=jackett --net=container:delugevpn -p 9117:9117 -e PUID=1000 -e PGID=1000 -e TZ=Europe/London -e AUTO_UPDATE=true --restart unless-stopped linuxserver/jackett
  • If you are running Sonarr in Docker, you can try http://jackett:9117/torznab/all/ or http://**docker-ip**:9117/torznab/all/ instead. localhost is not going to work

Morning guys - as an update:

@ilike2burnthing - I read through your links and both were really helpful re using a VPN'd container to channel traffic for another container. (in my case, Jackett through Deluge) - by the looks of what i've read there, I've done the right thing and my connection seems fine and set up as it should be.

@ngosang - I amended my connection string to the below:

docker run --name=jackett --net=container:delugevpn -p 9117:9117 -v ${MOUNT_POINT}/jackett/config:/config -v ${MOUNT_POINT}/jackett/downloads:/downloads-e PUID=1000 -e PGID=1000 -e TZ=Europe/London -e AUTO_UPDATE=true --restart unless-stopped linuxserver/jackett

but it wont let me use another containers network AND specify a port. As per @ilike2burnthing's links, the port needs specifying on the other container. Taking this out of the connection string allows it to start and run jackett. From here I can connect to the GUI via http://localhost:9117/UI/Dashboard again and we're back to where we were before.

As extra info, I'm accessing Sonarr from http://localhost:8989/settings/indexers - so it looks like everything seems to be ok with being accessed from localhost - @ngosang, why would localhost not work in Sonarr when I can go to 'http://localhost:9117/torznab/all/api?t=myapikey' in a browser and that works?

To address @garfield69's concerns about it being the deluge network, I've also deleted the whole thing and set up Jackett with the below connection not using a VPN at all:

docker run --name=jackett -p 9117:9117 -v ${MOUNT_POINT}/jackett/config:/config -v ${MOUNT_POINT}/jackett/downloads:/downloads-e PUID=1000 -e PGID=1000 -e TZ=Europe/London -e AUTO_UPDATE=true --restart unless-stopped linuxserver/jackett

This connects, and starting up a CLI and running curl -s http://ifconfig.me returns my WAN IP as expected. However I still get the exact same problem when trying to add indexes to Sonarr.

I have tried:
Jackett loaded with and without a VPN
Connections to Sonarr with:
http://127.0.0.1:9117/torznab/all
http://localhost:9117/api/v2.0/indexers/all/results/torznab/
http://localhost:9117/api/v2.0/indexers/thepiratebay/results/torznab/ (and other direct links from the button on jackett)
http://myWANIP:9117/all_variations_as_above (when Jackett is NOT through VPN)
http://theVPN'sPublicIP:9117/all_variations_as_above (when Jackett IS through VPN)
http://jackett:9117/all_variations_as_above

..and probably some other ridiculous variations as a 'maybe this'll work...' attempt lol.

thank you @garfield69 for the link to the discord docker support chat - I will post something there too in a hope its something someone's come across before. Otherwise I'm still happy to try any other ideas?

Thanks for your inputs so far - its very appreciated!!

To expand on what ngosang said, you can try replacing localhost with the IP of the Jackett container (not your WAN or VPN IP), 172.x.x.x
e.g. http://172.17.0.5:9117/api/v2.0/indexers/all/results/torznab/

Or you can try adding --link=<jackett>:jackett to Sonarr's run command, and use http://jackett:9117/api/v2.0/indexers/all/results/torznab/

Those won't work outside of Docker, but should work within Sonarr.

I dont think I've ever been this happy..

image

Both solutions worked - I ended up adding the link to my run command for Sonarr and my final connection was below:

image

I didn't realise ever container had its own IP! Luckily for me Portainer lists them out fairly visably.

Because I am routing my network for jackett through deluge for the VPN, I had to use the deluge containers IP, and during the link, I had to use --link=DelugeVPN:Jackett to be able to use the http://Jackett:9117/ url.. what a learning curve!

Solid effort guys. Thank you!

Was this page helpful?
0 / 5 - 0 ratings