DyonR / docker-Jackettvpn

Docker container which runs a headless Jackett Server with an optional WireGuard or OpenVPN connection
https://hub.docker.com/r/dyonr/jackettvpn/
GNU General Public License v3.0
70 stars 31 forks source link

container losing openvpn connection, not reconnecting? #61

Open NiceManiac opened 2 years ago

NiceManiac commented 2 years ago

Hello,

I am quite a noob when it comes to docker. i have installed the module using the following command:

docker run --privileged -d \ -v /home/pentonit/jackettvpn/config:/config \ -v /home/pentonit/jackettvpn/blackhole:/blackhole \ -e "VPN_ENABLED=yes" \ -e "VPN_TYPE=openvpn" \ -e "LAN_NETWORK=192.168.68.0/24" \ -p 9117:9117 \ --sysctl net.ipv6.conf.all.disable_ipv6=1 \ --name jackettvpn \ --env "VPN_OPTIONS=--inactive 3600 --ping 10 --ping-exit 60" \ --restart unless-stopped \ dyonr/jackettvpn

When the conatiner starts, everything works as expected, with the openvpn file supplied, but after a while it stops working(the web portal loads but all indexers fail tests)

If i restart the container, everything works again, but i cant keep watch over the container and restart it every time it stops working. I dont know that much about docker but it is running on Ubuntu 20.04 LTS. If any more info is needed(or logs, although i dont know how to acquire that) just let me know.

DyonR commented 2 years ago

Can you post the log of the container itself?
you can get those by running docker logs jackettvpn

NiceManiac commented 2 years ago

Can you post the log of the container itself? you can get those by running docker logs jackettvpn jackettvpn docker logs.txt

NiceManiac commented 2 years ago

i recreated the container with this commandset and it seems to be stable for now, but its only been running for a couple of hours, usually it dies after 12-20 hours.

docker run --privileged -d \ -v /home/pentonit/jackettvpn/config:/config \ -v /home/pentonit/jackettvpn/blackhole:/blackhole \ -e "VPN_ENABLED=yes" \ -e "VPN_TYPE=openvpn" \ -e "LAN_NETWORK=192.168.68.0/24" \ -e "PUID=1000" \ -e "PGID=1000" \ -e "VPN_USERNAME=MY USERNAME" \ -e "VPN_PASSWORD=MY PASSWORD" \ -p 9117:9117 \ --sysctl net.ipv6.conf.all.disable_ipv6=1 \ --name jackettvpn \ --env "VPN_OPTIONS=--inactive 3600 --ping 10 --ping-exit 60" \ --restart unless-stopped \ dyonr/jackettvpn

i substituted the username and password in this paste just to not post my username and password openly

NiceManiac commented 2 years ago

it is still failing it seems, attached new logs jackettvpn docker logs.txt .

NiceManiac commented 2 years ago

any updates on this?

schellappan commented 2 years ago

I have used the latest openvpn base scripts from transmission-openvpn and things seem to be working. I am not sure it's something @DyonR wants to merge to this branch. Needs a bit of work (documentation and script cleanup) and is tested only with nordvpn. So far I don't face the disconnect issue and the container has been running for about a day with no disconnect. It was annoying me for months.

Feel free to try schellappan/jackettvpn:v0.20.363.7 from dockerhub or build your own from container from https://github.com/schellappan/docker-Jackettvpn

Probably it only requires a trivial fix in the original code. But I am lazy.

NiceManiac commented 2 years ago

i tried your version but it seems to not work as expected with ProtonVPN. so we are back where we started i guess, i have no idea how to fix this, but i really hope that DyonR can find a solution for this.

NiceManiac commented 2 years ago

@DyonR any updates on this? still having this problem sporadically. only fix is remove the entire container and reinstall it, this is not a great solution in the long term.

mylogon341 commented 1 year ago

Is this dead, do you reckon? For months ive just been having the container restart every couple of hours just in case which is just a bit silly really and leads to indexing failures in *arrs if jackett is down for a while before the next scheduled restart.

NiceManiac commented 1 year ago

Is this dead, do you reckon? For months ive just been having the container restart every couple of hours just in case which is just a bit silly really and leads to indexing failures in *arrs if jackett is down for a while before the next scheduled restart.

i have switched to using wireguard and dont have any problems anymore. got tired of openvpn shenanigans

mylogon341 commented 1 year ago

can I ask what vpn you used for this @NiceManiac? I'm currently using nordvpn but don't think they provide a wireguard config.

NiceManiac commented 1 year ago

can I ask what vpn you used for this @NiceManiac? I'm currently using nordvpn but don't think they provide a wireguard config.

i am using PureVPN atm, used ProtonVPN earlier but they didnt have good wireguard support so i ended up switching to PureVPN

EDIT: here is my launch command now:

docker run --privileged -d \ -v /home/pentonit/jackettvpn/config:/config \ -v /home/pentonit/jackettvpn/blackhole:/blackhole \ -e "VPN_ENABLED=yes" \ -e "VPN_TYPE=wireguard" \ -e "LAN_NETWORK=192.168.68.0/24" \ -e "PUID=1000" \ -e "PGID=1000" \ -p 9117:9117 \ --sysctl net.ipv6.conf.all.disable_ipv6=1 \ --name jackettvpn \ --env "VPN_OPTIONS=--inactive 3600 --ping 10 --ping-exit 60" \ --restart unless-stopped \ dyonr/jackettvpn