-
Notifications
You must be signed in to change notification settings - Fork 759
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
OpenVPN process status says not running when it is. #3223
Comments
|
the status check connects to the socket, if that doesn't work, this might happen. (I've seen something similar over here too) core/src/etc/inc/plugins.inc.d/openvpn.inc Line 1304 in d27cc83
If it reports an error, we might want to check for a running pid before returning not active, if I'm not mistaken, you can't restart the server in these cases (since reported running), right? |
|
The pid's don't match. The running process pid and the one in var/run are different. Thus the dashboard says nay but openvpn says yay! You can't restart no, as the pid is wrong. Manually killing it will not help either as you also need to delete the stuck pid, do that and all is good. What I've done in my test is to force a clean up of the stuck pid in the openvpn restart function, at present it just deletes the stuck pid. What really should be done is to check that the process is actually not running - THEN delete the pid, however lets see what happens with my tester and see what he reports. |
|
sounds like a plan :) |
|
From previous tickets this seems to be a race in OpenVPN or maybe in the way we restart it in an edge case. However, it was not reproducible from my end.
… On 12. Feb 2019, at 08:54, Ad Schellevis ***@***.***> wrote:
sounds like a plan :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
No and I cannot reproduce it either, or at least only on rare occasions. Ned however can reproduce it at will. He's had the issue since the early 18 series, but now it's starting to annoy him so I said I'd tale a look. I think it only happens on restart, not sure if it does it on IF down/up. Whichever way this occurs, the only usual way a process would leave its pid behind is if it exits abnormally. |
|
Hi, some things I found out. This happens always after a restart: After reboot I see three times a Resync My guess is that the restarts are too close to each other so one get's started while the previous one still did not finish. And maybe the third one created the PID but then failed to start ... |
|
#3229 possible fix ... needs testing |
|
@BPtLNfxZWo @Space2Man can you please try c217bee ? |
|
Some patches from pfSense: |
|
Seems to work right now. |
|
Seems to work fine! After reboot service is listed as started! |
|
Ok, I cannot guarantee that this will not fail later anyway. Patches posted earlier suggest that OpenVPN may be issuing its PID files too late, but we'll see when we get there. Thanks everyone! ❤️ |
|
Hi, |
|
Looking at some debug info that I have been sent. Are you using a Dyn DNS service and are you using dhcp6 for WAN? |
|
Hi, in my case I'm using Dynamic DNS but no dhcpv6 on WAN. |
|
@marjohn56 I'll be in France from Friday my set up there is Dynamic DNS and dhcp6c on WAN. Want me to test anything ? Currently on 18.7.9 without issues planning to take the test system out and try 19.1.1 |
|
Yes, everything!
|
|
@BPtLNfxZWo > Hi, in my case I'm using Dynamic DNS but no dhcpv6 on WAN. so no ipv6? |
|
Hi, I'm have ipv6 activated, but only for (internal) testing purposes and not on the WAN Interface. |
|
Thanks, that rules something out, so no ipv6. Can you disable your Dyn DNS update and see if that has any effect on your openvpn issue. I'm trying to rule things out, I have no issues at all and I'm trying to replicate it. |
|
I just wanted to add that I am on a fresh setup on 19.1 LibreSSL side with very little configured. No IPv6 or DynDNS... just two WANs with failover, ipv4 DHCP on the LAN. I single port forwarding rule and pretty much everything else is pristine. |
|
I have the same problem:
OPNsense 19.1.2-amd64 |
|
Same issue here. It suddendly appeared after I've changed all my LAN subnet addresses by replacing them in the config backup file and restore it back. OPNsense 19.1.4-amd64 |
|
FYI: I am on 19.1.4 and issue is back ... yes, I am using IPv6 on WAN but no DynDNS. |
|
Funny, right after posting this 19.1.5 was released ... I just updated and OpenVPN is in status green again ... I will monitor. Thanks! |
|
I'll be back eventually. This is a race condition inside OpenVPN and its PID file creation in which OpenVPN backgrounds itself before the PID file is written. Someone needs to write safeguard code here in order to fix this. I don't think OpenVPN will.... |
|
Hi, can confirm ... after "saving" WAN interface to trigger reload issue is back ... really seems to be some race condition. Nevertheless thanks for all the support ... I mean, it's working ... so it's only a display issue. |
|
I'll try to look at it for 19.7. At the moment, however, priorities lie elsewhere. |
|
I tested this on a VM. When I built the new OPNsense firewall on version 19.7 (not the latest but just 19.7), there were no issues. But I took a VMware snapshot and spun a new firewall up from that template, which carried the CA, self-signed cert, VPN server and OTP server and I observed that the firewall is exhibiting the same behaviour mentioned on this issue.
Thought worth sharing. |
|
This is a closed ticket.
If you experience this OpenVPN takes more than 10 seconds to come up.
There’s a log message in any case you haven’t provided here. It probably points to the former timeout comment.
… On 27. Jan 2020, at 22:14, Ayyappan Ramanan ***@***.***> wrote:
I tested this on a VM. When I built the new OPNsense firewall on version 19.7 (not the latest but just 19.7), there were no issues. But I took a VMware snapshot and spun a new firewall up from that template, which carried the CA, self-signed cert, VPN server and OTP server and I observed that the firewall is exhibiting the same behaviour mentioned on this issue.
Dashboard says OPENVPN not working.
Server error log : openvpn[66505]: Exiting due to fatal error
VPN server 'Connection Status' indeterminable.
Clients can connect successfully.
Thought worth sharing.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
https://forum.opnsense.org/index.php?topic=11562.0
This seems to be a stick pid issue. We are testing a solution for it.
The text was updated successfully, but these errors were encountered: