binhex / arch-delugevpn

Docker build script for Arch Linux base with Deluge, Privoxy and OpenVPN
GNU General Public License v3.0
690 stars 112 forks source link

Flaky Proxy: The proxy tunnel request to proxy 'http://192.168.0.121:8118/' failed with status code '404'. #347

Open asherbig opened 1 year ago

asherbig commented 1 year ago

All of my applications that use the proxy provided by the container will have flaky success. Some requests make it through fine. Others don't. It seems random, but it does also seem like using the proxy causes it to crash and then come back. The logs do not show anything as the requests succeed or fail though.

The error message in the title The proxy tunnel request to proxy 'http://192.168.0.121:8118/' failed with status code '404'. comes from testing the health check endpoints for indexers using Jackett. Half of the indexers succeeded in their health check and half failed with that error message. (4 failures, 4 successes). When starting another "test all", 5 succeed and 3 fail, and it's always seemingly random which indexers fail.

In sonarr and radarr, I get the message Failed to test proxy: https://radarr.servarr.com/v1/ping frequently. It's random when that appears. Sometimes it persists through restarts, but sometimes not.

I also get log messages like below in sonarr/radarr.

[Info] RssSyncService: Starting RSS Sync
sonarr          | [Error] Torznab: An error occurred while processing feed. http://192.168.0.121:9117/api/v2.0/indexers/nyaasi/results/torznab/api?t=tvsearch&cat=5070&extended=1&apikey=API_KEY&offset=0&limit=100
sonarr          |
sonarr          | [v3.0.9.1549] NzbDrone.Core.Indexers.Torznab.TorznabException: Torznab error detected: Jackett.Common.IndexerException: Exception (nyaasi): The proxy tunnel request to proxy 'http://192.168.0.121:8118/' failed with status code '404'."
sonarr          |  ---> System.Net.Http.HttpRequestException: The proxy tunnel request to proxy 'http://192.168.0.121:8118/' failed with status code '404'."

Logs from the delugevpn container: https://gist.github.com/asherbig/7e1c7d3c2a956032e96c794fe685c41b

Carbur8tr commented 1 year ago

Bump, I am noticing the same behavior.

lselortondo commented 1 year ago

Having the same issues. I am actually having it with sabnzbdvpn but I suspect it is related.

binhex commented 1 year ago

try blowing away the config for privoxy, so delete directory /config/privoxy/ then restart the container.

lselortondo commented 1 year ago

try blowing away the config for privoxy, so delete directory /config/privoxy/ then restart the container.

That worked. Thank you!

asherbig commented 1 year ago

try blowing away the config for privoxy, so delete directory /config/privoxy/ then restart the container.

I tried this and it worked! I am suspicious how long it will last though. I've blown away the entire delugevpn config folder before, and it did fix the issue for about a day before I saw the same behavior return. I'll update here if the setup starts erroring again, or if it holds without problems for a while!

Thank you for your help. Do you know why blowing the config away works?

binhex commented 1 year ago

Thank you for your help. Do you know why blowing the config away works?

i suspect corruption of the config file, or breaking code change when bumping version of privoxy, if it happens again then attach file /config/privoxy/config

asherbig commented 1 year ago

config

(renamed from config to config.txt so github would accept it)

I noticed the proxy failing again with the same errors as the original post (tested all jackett indexers, half of them failed with the 404 message from the proxy.)

binhex commented 1 year ago

half of them failed with the 404 message from the proxy.)

so half of them did not fail, even though jackett is configured to use the proxy?, in that case i suspect vpn ip blocking by the index site - most probably due to historic abuse by that block of ip's.

asherbig commented 1 year ago

It's not the same that fail. Sometimes more fail, sometimes less fail. It's almost always different sites that fail. And the radarr/sonarr ping addresses also fail randomly

asherbig commented 1 year ago

The issue has been very noticeably bad recently. The proxy will stop working within minutes of restarting the container. I'll be happy to help you debug what's going on but for the time being, the only option I have is to not have any of my other containers use the proxy.

Edit When not using the proxy, all indexers ping successfully in Jackett.

Devo-McDuff commented 1 year ago

I too have started having same the exact same issues since maybe December. Same setup, Jackett pointing at Deluge running Privoxy. I have about 15 indexers and around a third to a half fail intermittently. Could this be PIA VPN issue?

Carbur8tr commented 1 year ago

Second bump, I’ve blown away the config now twice and both times it seems to get better but the issue still persists.

binhex commented 1 year ago

i dont currently use privoxy too much myself, but i will see if i can get it to stop working for me so i can try and debug this further.

Devo-McDuff commented 1 year ago

Great thank you. Just to add, I tried deleting Privoxy config a few days ago and didn't notice a difference. Occasionally though it seems fine and all indexers pass test in Jacket, in fact I just tried right now and they did. Normally it goes back to regular fails but I'll keep an eye on it to see if there is a change.

bigdant commented 1 year ago

Hi All,

I'm having this issue as well. I removed the Privoxy folder and removed the container.

Re-downloaded the container and restarted it and i still have the same issue with jackett.

morkyy commented 1 year ago

Having the exact same issue here. Jackett has started failing to go through privoxy with a 404 error. This happens on different indexers each time and not always.

I have also just tried to set up prowlarr and set up the privoxy connection there but that fails as well during test with a 404 error. Bot sure why that one would fail if I don't have any actual indexers set up there and I'm just doing the privoxy set up.

Carbur8tr commented 1 year ago

Just another bump, for those still having this issue. Try looking in your container and verify that you're not using PIA's name servers.

Maybe @binhex can help to explain why this makes a difference. I've read a few other threads now with users complaining about this so I figured I would add this to see if it helps.

Remove if you find: 209.222.18.222 209.222.18.218

Any suggestions on name servers are appreciated as well.

morkyy commented 1 year ago

Just another bump, for those still having this issue. Try looking in your container and verify that you're not using PIA's name servers.

Maybe @binhex can help to explain why this makes a difference. I've read a few other threads now with users complaining about this so I figured I would add this to see if it helps.

Remove if you find: 209.222.18.222 209.222.18.218

Any suggestions on name servers are appreciated as well.

That's interesting. Just as a test I added my internal DNS server in that list (without removing any of the other name servers) and that seemed to fix the issue completely. No 404 whatsoever after that.

Obviously this isn't a good fix due to potential leaks if I use my own DNS, but it's weird how this affects privoxy. It's using an internal IP so one would think that the DNS servers are not relevant at all?