0

OpenVPN starts and runs just fine when I invoke it directly from the command line, but when I try to start it as a process via systemd, it throws a failure error that I can't find a solution to.

Here's the result of systemctl status openvpn@vpnht-128.service ("vpnht-128" is the name of my config file):

 openvpn@vpnht-128.service - OpenVPN connection to vpnht-128
   Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sal 2015-04-21 15:25:01 EEST; 5h 58min ago
  Process: 295 ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i --writepid /run/openvpn@%i.pid (code=exited, status=1/FAILURE)

Apr 21 15:23:31 ben systemd[1]: Starting OpenVPN connection to vpnht-128...
Apr 21 15:23:32 ben openvpn@vpnht-128[295]: OpenVPN 2.3.6 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Dec  2 2014
Apr 21 15:23:32 ben openvpn@vpnht-128[295]: library versions: OpenSSL 1.0.2a 19 Mar 2015, LZO 2.09
Apr 21 15:25:01 ben systemd[1]: openvpn@vpnht-128.service start operation timed out. Terminating.
Apr 21 15:25:01 ben openvpn@vpnht-128[295]: ERROR: could not not read Auth password from stdin
Apr 21 15:25:01 ben openvpn@vpnht-128[295]: Exiting due to fatal error
Apr 21 15:25:01 ben systemd[1]: openvpn@vpnht-128.service: control process exited, code=exited status=1
Apr 21 15:25:01 ben systemd[1]: Failed to start OpenVPN connection to vpnht-128.
Apr 21 15:25:01 ben systemd[1]: Unit openvpn@vpnht-128.service entered failed state.
Apr 21 15:25:01 ben systemd[1]: openvpn@vpnht-128.service failed.

Here's my OpenVPN config file on GitHub.

All I'm trying to do is automatically pipe in my VPN username and password.

I apologize in advance is there's a resolved thread about this, but I've spent all day scouring various forums and finding no concrete solutions. What am I missing?

  • Please do not post screenshots of textual output, paste the actual text... Also, please paste your config file with any sensitive information redacted/obfuscated. – jasonwryan Apr 21 '15 at 18:18
  • I've fixed both those. – Ben Thomas Apr 21 '15 at 18:43
  • What is auth.dat and how is openvpn expected to read it? – jasonwryan Apr 21 '15 at 18:58
  • auth.dat is a file containing my VPN username and password, and it's located in the same directory as the config file. It was a possible solution suggested in one of the threads I read. – Ben Thomas Apr 21 '15 at 19:09
  • Openvpn doesn't seem able to read that file: does it have the correct permissions? – jasonwryan Apr 21 '15 at 19:12
1

I turned out that I needed to update a second OpenVPN config file to look for auth.dat. Now it works.

  • FWIW, .dat is a generic extension (generally found on Windows); I'd just remove it... – jasonwryan Apr 21 '15 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.