I just managed to cut my OpenVPN connection to some 20 servers tonight. I was experimenting with the client-connect
scripts, and at some point one of the scripts returned a non zero response. This non zero response triggered an AUTH: Received AUTH_FAILED control message
in the syslog
which eventually resulted in a SIGTERM[soft,auth-failure] received, process exiting
exit from the OpenVPN client. Is there a way to protect myself from this? Any configuration on the server or client side?
The easiest way to protect yourself from this is to wrap the openvpn client in a while loop that restarts it. Looking at the openvpn discussion list it appears this was a design decision made because auth failures likely require manual intervention and having the client retry repeatedly would in many cases lock out the user (according to SOX/PCI compatible security precautions). It isn't clear what your OS config is, in OS X the launchd would take care of respawning this.
I've been seeing the same problem intermittently. polynomial's answer seems to be correct - I'm sure in my cause it's a network/connection error and not authentication.
Starting OpenVPN with the following script has fixed it for me, although you might need to adjust it for your local setup: