-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix(ns-plug): restarting ns-plug indefinetly #1104
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature does not work as expected.
If the VPN connection is terminated because the controller is not reachable, the client enters in a loop state:
Mar 5 13:23:54 NethSec ns-plug[11742]: 2025-03-05 13:23:54 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mar 5 13:23:54 NethSec ns-plug[11742]: 2025-03-05 13:23:54 TCP/UDP: Preserving recently used remote address: [AF_INET]206.189.3.76:20001
Mar 5 13:23:54 NethSec ns-plug[11742]: 2025-03-05 13:23:54 Socket Buffers: R=[212992->212992] S=[212992->212992]
Mar 5 13:23:54 NethSec ns-plug[11742]: 2025-03-05 13:23:54 UDPv4 link local: (not bound)
Mar 5 13:23:54 NethSec ns-plug[11742]: 2025-03-05 13:23:54 UDPv4 link remote: [AF_INET]206.189.3.76:20001
Mar 5 13:23:54 NethSec ns-plug[11742]: 2025-03-05 13:23:54 read UDPv4 [ECONNREFUSED]: Connection refused (fd=3,code=111)
Mar 5 13:23:57 NethSec ns-plug[11742]: 2025-03-05 13:23:57 read UDPv4 [ECONNREFUSED]: Connection refused (fd=3,code=111)
Mar 5 13:23:59 NethSec ns-plug[11742]: 2025-03-05 13:23:59 Server poll timeout, restarting
Mar 5 13:23:59 NethSec ns-plug[11742]: 2025-03-05 13:23:59 SIGUSR1[soft,server_poll] received, process restarting
Mar 5 13:23:59 NethSec ns-plug[11742]: 2025-03-05 13:23:59 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Mar 5 13:23:59 NethSec ns-plug[11742]: 2025-03-05 13:23:59 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mar 5 13:23:59 NethSec ns-plug[11742]: 2025-03-05 13:23:59 TCP/UDP: Preserving recently used remote address: [AF_INET]206.189.3.76:20001
Mar 5 13:23:59 NethSec ns-plug[11742]: 2025-03-05 13:23:59 Socket Buffers: R=[212992->212992] S=[212992->212992]
Mar 5 13:23:59 NethSec ns-plug[11742]: 2025-03-05 13:23:59 UDPv4 link local: (not bound)
Mar 5 13:23:59 NethSec ns-plug[11742]: 2025-03-05 13:23:59 UDPv4 link remote: [AF_INET]206.189.3.76:20001
Mar 5 13:23:59 NethSec ns-plug[11742]: 2025-03-05 13:23:59 read UDPv4 [ECONNREFUSED]: Connection refused (fd=3,code=111)
Mar 5 13:24:01 NethSec ns-plug[11742]: 2025-03-05 13:24:01 read UDPv4 [ECONNREFUSED]: Connection refused (fd=3,code=111)
If the VPN is not connected and controller it's not reachable, the ns-plug exists with 5 and procd does not restart it.
My bad. |
In case of something breaking (loss of connection or upstream server not available), restart ns-plug every 5 minutes to try and revive the process.
This needs to be tested even before merging for the following:
ns-plug
service (by removing the controller assignation and adding it back again)Ref: