Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Internal auto-healing restarts VPN connection even if it's stopped using control server #2236

Open
smolpaw opened this issue Apr 24, 2024 · 2 comments

Comments

@smolpaw
Copy link

smolpaw commented Apr 24, 2024

Is this urgent?

No

Host OS

Ubuntu 22.04.4 LTS (Jammy Jellyfish)

CPU arch

x86_64

VPN service provider

ProtonVPN

What are you using to run the container

docker-compose

What is the version of Gluetun

Running version latest built on 2024-04-08T07:43:05.096Z (commit 7b4befc)

What's the problem 🤔

When the VPN is stopped using control server the internal auto-healing restarts the connection after few seconds. Since control server allows both stopping and starting the VPN I assumed the VPN will stay shut until I send another request to start again.

Is this the intended behavior ?

Share your logs (at least 10 lines)

gluetun  | 2024-04-24T17:14:44 INFO [openvpn] UID set to nonrootuser
gluetun  | 2024-04-24T17:14:44 INFO [openvpn] Initialization Sequence Completed
gluetun  | 2024-04-24T17:14:44 INFO [healthcheck] healthy!
gluetun  | 2024-04-24T17:14:49 INFO [ip getter] Public IP address is X.X.X.X (Singapore, Singapore, Singapore)
gluetun  | 2024-04-24T17:14:50 INFO [vpn] You are running on the bleeding edge of latest!
gluetun  | 2024-04-24T17:14:56 INFO [vpn] stopping
gluetun  | 2024-04-24T17:14:56 INFO [http server] 200 PUT /status wrote 22B to 172.23.0.1:42252 in 81.840904ms
gluetun  | 2024-04-24T17:15:06 INFO [healthcheck] program has been unhealthy for 6s: restarting VPN
gluetun  | 2024-04-24T17:15:06 INFO [healthcheck] 👉 See https://github.com/qdm12/gluetun-wiki/blob/main/faq/healthcheck.md
gluetun  | 2024-04-24T17:15:06 INFO [healthcheck] DO NOT OPEN AN ISSUE UNLESS YOU READ AND TRIED EACH POSSIBLE SOLUTION
gluetun  | 2024-04-24T17:15:06 INFO [vpn] starting
gluetun  | 2024-04-24T17:15:06 INFO [firewall] allowing VPN connection...
gluetun  | 2024-04-24T17:15:06 INFO [openvpn] OpenVPN 2.6.8 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]

Share your configuration

No response

Copy link
Contributor

@qdm12 is more or less the only maintainer of this project and works on it in his free time.
Please:

@qdm12
Copy link
Owner

qdm12 commented Apr 28, 2024

No it's indeed a bug, since the healthcheck isn't aware of the VPN "Loop state", and only knows to trigger a restart of the loop when it fails the healthcheck. The ugly workaround for now is to more or less disable the healthcheck trying to reboot the VPN with HEALTH_VPN_DURATION_INITIAL=1000h for example. Not a solution for sure though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants