binhex / arch-delugevpn

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

Deluge suddenly stops working #192

Closed ihatecomputerswithapassion closed 4 years ago

ihatecomputerswithapassion commented 4 years ago

I'm running into issues where deluge UI is accessible but it has stopped downloading. And after a restart of the container, the UI is no longer accessible.

The last time it happened I resolved it by adding the additional port, thinking that was the end of it. Even though the ovpn file I used at that time didn't even support port forwarding.

But after about 24 hours, it stopped working again and I can't get it resolved. While it works, I can curl from the container, but when it doesn't work I can't resolve a host.

# curl www.google.com
curl: (6) Could not resolve host: www.google.com

I would assume this is related to the VPN no longer working?

Here's my config:

docker run -d \
    --cap-add=NET_ADMIN \
    -p 8112:8112 \
    -p 8118:8118 \
    -p 58846:58846 \
    -p 58946:58946 \
    --name=delugevpn \
    -v ./data:/data \
    -v ./config:/config \
    -v ./temp:/downloads \
    -v ./tv:/tv \
    -v ./movies:/movies \
    -v /etc/localtime:/etc/localtime:ro \
    -e VPN_ENABLED=yes \
    -e VPN_PROV=pia \
    -e STRICT_PORT_FORWARD=yes \
    -e ENABLE_PRIVOXY=no \
    -e LAN_NETWORK=192.168.0.0/16 \
    -e NAME_SERVERS=209.222.18.222,84.200.69.80,37.235.1.174,1.1.1.1,209.222.18.218,37.235.1.177,84.200.70.40,1.0.0.1 \
    -e DELUGE_DAEMON_LOG_LEVEL=info \
    -e DELUGE_WEB_LOG_LEVEL=info \
    -e ADDITIONAL_PORTS=1198 \
    -e DEBUG=false \
    -e UMASK=000 \
    -e PUID=0 \
    -e PGID=0 \
    binhex/arch-delugevpn

Here's the logs when I start it up.

[info] Attempting to load iptable_mangle module...
2020-08-19 21:56:47,220 DEBG 'start-script' stderr output:
modprobe: FATAL: Module iptable_mangle not found in directory /lib/modules/5.4.0-26-generic
2020-08-19 21:56:47,221 DEBG 'start-script' stdout output:
[warn] Unable to load iptable_mangle module using modprobe, trying insmod...
2020-08-19 21:56:47,221 DEBG 'start-script' stderr output:
insmod: ERROR: could not load module /lib/modules/iptable_mangle.ko: No such file or directory
2020-08-19 21:56:47,221 DEBG 'start-script' stdout output:
[warn] Unable to load iptable_mangle module, you will not be able to connect to the applications Web UI or Privoxy outside of your LAN
2020-08-19 21:56:47,222 DEBG 'start-script' stdout output:
[info] unRAID/Ubuntu users: Please attempt to load the module by executing the following on your host: '/sbin/modprobe iptable_mangle'
[info] Synology users: Please attempt to load the module by executing the following on your host: 'insmod /lib/modules/iptable_mangle.ko'
2020-08-19 21:56:47,234 DEBG 'start-script' stdout output:
[info] Docker network defined as    172.17.0.0/16
2020-08-19 21:56:47,237 DEBG 'start-script' stdout output:
[info] Adding 192.168.0.0/16 as route via docker eth0
2020-08-19 21:56:47,238 DEBG 'start-script' stdout output:
[info] ip route defined as follows...
--------------------
2020-08-19 21:56:47,239 DEBG 'start-script' stdout output:
default via 172.17.0.1 dev eth0 
172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.3 
192.168.0.0/16 via 172.17.0.1 dev eth0 
2020-08-19 21:56:47,239 DEBG 'start-script' stdout output:
--------------------
2020-08-19 21:56:47,250 DEBG 'start-script' stdout output:
[info] Adding additional incoming port 1198 for eth0
2020-08-19 21:56:47,269 DEBG 'start-script' stdout output:
[info] Adding additional outgoing port 1198 for eth0
2020-08-19 21:56:47,277 DEBG 'start-script' stdout output:
[info] iptables defined as follows...
--------------------
2020-08-19 21:56:47,279 DEBG 'start-script' stdout output:
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT DROP
-A INPUT -s 172.17.0.0/16 -d 172.17.0.0/16 -j ACCEPT
-A INPUT -i eth0 -p udp -m udp --sport 1198 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 8112 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --sport 8112 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 1198 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --sport 1198 -j ACCEPT
-A INPUT -s 192.168.0.0/16 -i eth0 -p tcp -m tcp --dport 58846 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i tun0 -j ACCEPT
-A OUTPUT -s 172.17.0.0/16 -d 172.17.0.0/16 -j ACCEPT
-A OUTPUT -o eth0 -p udp -m udp --dport 1198 -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --dport 8112 -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 8112 -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --dport 1198 -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 1198 -j ACCEPT
-A OUTPUT -d 192.168.0.0/16 -o eth0 -p tcp -m tcp --sport 58846 -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -o tun0 -j ACCEPT
2020-08-19 21:56:47,280 DEBG 'start-script' stdout output:
--------------------
2020-08-19 21:56:47,280 DEBG 'start-script' stdout output:
fo] Starting OpenVPN...
2020-08-19 21:56:47,284 DEBG 'start-script' stdout output:
Wed Aug 19 21:56:47 2020 WARNING: file '/config/auth.txt' is group or others accessible
2020-08-19 21:56:47,285 DEBG 'start-script' stdout output:
Wed Aug 19 21:56:47 2020 OpenVPN 2.4.9 [git:makepkg/9b0dafca6c50b8bb+] x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Apr 20 2020
Wed Aug 19 21:56:47 2020 library versions: OpenSSL 1.1.1g  21 Apr 2020, LZO 2.10
2020-08-19 21:56:47,285 DEBG 'start-script' stdout output:
[info] OpenVPN started
2020-08-19 21:56:47,285 DEBG 'start-script' stdout output:
Wed Aug 19 21:56:47 2020 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2020-08-19 21:56:47,287 DEBG 'start-script' stdout output:
Wed Aug 19 21:56:47 2020 CRL: loaded 1 CRLs from file [[INLINE]]
2020-08-19 21:56:47,287 DEBG 'start-script' stdout output:
Wed Aug 19 21:56:47 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]PIA_IPADDREZZZZ:1198
2020-08-19 21:56:47,287 DEBG 'start-script' stdout output:
Wed Aug 19 21:56:47 2020 UDP link local: (not bound)
Wed Aug 19 21:56:47 2020 UDP link remote: [AF_INET]PIA_IPADDREZZZZ:1198

I have now tried to use a PIA ovpn file that support port forwarding, testing with DE Berlin at the moment, I'm not getting the VPN to start:

[warn] Exit code '56' from curl != 0 or no response body received, exhausted retries
2020-08-19 22:26:57,409 DEBG 'start-script' stdout output:
[warn] Unable to download file from url 'http://209.222.18.222:2000/?client_id=<hidden>', exiting script...
2020-08-19 22:26:57,409 DEBG 'start-script' stdout output:
[warn] PIA VPN port assignment API currently down, terminating OpenVPN process to force retry for incoming port...
2020-08-19 22:26:57,410 DEBG 'start-script' stdout output:
Wed Aug 19 22:26:57 2020 event_wait : Interrupted system call (code=4)
2020-08-19 22:26:57,413 DEBG 'start-script' stdout output:
Wed Aug 19 22:26:57 2020 /usr/bin/ip addr del dev tun0 local 10.27.10.6 peer 10.27.10.5
2020-08-19 22:26:57,460 DEBG 'start-script' stdout output:
Wed Aug 19 22:26:57 2020 SIGINT[hard,] received, process exiting

Any help is greatly appreciated.

binhex commented 4 years ago

This is due to PIA moving over to their 'nextgen' network which is causing interruptions in their existing network, you will need to try some other endpoints, i know ca-montreal works as im using this one without issue.

ihatecomputerswithapassion commented 4 years ago

ca-montreal worked perfectly, thanks!

Is there any status page one can follow at PIA for this maintenance and do you expect these changes will require some future changes on your side?

phil-hudson commented 4 years ago

Tried CA Montreal but am stuck with the external IP showing in Deluge as N/A - any ideas what we can do here please?

binhex commented 4 years ago

@phil-hudson please do the following and post a link to the log, pastebin or something similar:- https://github.com/binhex/documentation/blob/master/docker/faq/help.md

iiLaurens commented 4 years ago

I had the problem as well but it eventually fixed it self, seemed to be indeed due to upgrades happening at PIA. But just recently I started getting different issue, where the vpn would connect but it would get stuck at trying to get a port. The curl seems to fail when I look at the logs: http://209.222.18.222:2000/?client_id=...

Dooes anyone else experience this well?

ihatecomputerswithapassion commented 4 years ago

CA montreal stopped working, can't find any substitute region that works. Sometimes get it to work after numerous restarts of the container.

Also noticed that Sonarr and Radarr (linuxserver's latest image) fails to import completed downloads even though the tests towards the download client is successful, normally resolves once I've successfully restarted the delugevpn container.

Ryonez commented 4 years ago

This is also doesn't work for me. Am getting a little worried as the Swiss and Swedin endpoints no longer support port forwarding.

phil-hudson commented 4 years ago

Ended up just changing container to transmission

Sent from my iPhone

On 9 Sep 2020, at 19:06, Ryonez Coruscare notifications@github.com wrote:

 This is also doesn't work for me. Am getting a little worried as the Swiss and Swedin endpoints no longer support port forwarding.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Ryonez commented 4 years ago

This keeps breaking, currently got DE Berlin going. Will the NEXTGEN network work in this docker image?

GlenConway commented 4 years ago

I am also working with DE Berlin for now.

binhex commented 4 years ago

https://github.com/binhex/arch-delugevpn/issues/194#issuecomment-691044876

ihatecomputerswithapassion commented 4 years ago

Works just fine with port forwarding disabled. Only annoying thing now is that it stops working with Sonarr after a few minutes/hours. Cron job to restart the delugevpn container every 60 min has so far been the easiest workaround.

binhex commented 4 years ago

Support for multi remote endpoints and PIA 'Next-Gen' networks now complete, see Q19 and Q20 for details:- https://github.com/binhex/documentation/blob/master/docker/faq/vpn.md