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

--ping-exit crashes whole vpn setup in docker compose #28

Closed
DavHau opened this issue Apr 5, 2019 · 7 comments
Closed

--ping-exit crashes whole vpn setup in docker compose #28

DavHau opened this issue Apr 5, 2019 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@DavHau
Copy link

DavHau commented Apr 5, 2019

First, thanks for the great image. I'm using it since a few weeks and I'm quite happy with it.
But there is one problem i encountered with the latest version.

The --ping-exit 180 which has recently been added as a recommendation doesn't seem like a good idea
Whenever the vpn container loses its connection for more than 180 sec, all containers which connect through the vpn will lose their internet connection forever. (Until they are restarted manually)
They will not reconnect through the vpn even if the vpn restarts and reconnects successfully.
The problem is whenever multiple child container share the network of a mother container via 'network_mode:service', they will lose their network adapter indefinitely when the mother container restarts.
I opened an issue for docker compose. but i don't know if they will improve this behavior.

replacing --ping-exit with --ping-restart seems to fix the issue, since this doesn't exit the whole container and keeps the network interface intact.

@DavHau DavHau added the bug Something isn't working label Apr 5, 2019
DavHau pushed a commit to DavHau/nordvpn that referenced this issue Apr 6, 2019
@bubuntux
Copy link
Owner

bubuntux commented Apr 6, 2019

in that case --ping-restart is actually not need it, since the server usually push those into the client.
this will keep the interface intact as you point out, but keep trying to reconnect to the same server.

The reason why i was using the --ping-exit is to select a new server instead, seems like a need a better strategy.

@DavHau
Copy link
Author

DavHau commented Apr 6, 2019

Maybe starting the vpn process in a loop inside the container is the solution. Then the whole vpn process will actually restart without the container being restarted.

@bubuntux
Copy link
Owner

bubuntux commented Apr 6, 2019

yup i have created a temporal tag named 'dev' that contains a possible fix, i did a few tests and seems to be working do you mind give it a shot?

@bubuntux
Copy link
Owner

bubuntux commented Apr 6, 2019

actually never mind, it doesn't work the way i was expecting =/

@bubuntux
Copy link
Owner

bubuntux commented Apr 8, 2019

latest dev tag should try to reconnect selecting new servers every time it get disconnected due --ping-exit, can you give it a shoot now?

@DavHau
Copy link
Author

DavHau commented Apr 8, 2019

I just tried. Works like a charm... exactly how you described. New server got selected after disconnect. Thanks for the fix

@DavHau DavHau closed this as completed Apr 8, 2019
@bubuntux
Copy link
Owner

bubuntux commented Apr 8, 2019

i just merged the fix into latest, thanks for reporting the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants