1

I've got OpenVPN working good with my config file if I run it from CLI:

openvpn server.conf

But if I try to start it as a service it starts just fine, won't error out, but it will not load my conf file since there is no resulting tun device in ifconfig.

I have AUTOSTART set to all in /etc/init.d/openvpn:

enter image description here

But a quick ifconfig shows it's not started. I know it's not loading my conf file since the log file is not created, but no errors from OpenVPN.

enter image description here

This is on Ubuntu 16.04.3, fresh clean install of OpenVPN.

EDIT

As per comments below I have tried multiple times also with systemctl, it just errors out:

enter image description here enter image description here

I know the conf file works since I can run it from CLI as openvpn server.conf and it works.

EDIT2

Logs:

Jan 11 14:31:37 cloud systemd[1]: openvpn@server.service: Unit entered failed state.
Jan 11 14:31:37 cloud systemd[1]: openvpn@server.service: Failed with result 'exit-code'.
Jan 11 16:06:07 cloud systemd[1]: Starting OpenVPN connection to server...
Jan 11 16:06:07 cloud ovpn-server[4726]: OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 22 2017
Jan 11 16:06:07 cloud ovpn-server[4726]: library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
Jan 11 16:06:07 cloud ovpn-server[4726]: daemon() failed or unsupported: Resource temporarily unavailable (errno=11)
Jan 11 16:06:07 cloud ovpn-server[4726]: Exiting due to fatal error
Jan 11 16:06:07 cloud systemd[1]: openvpn@server.service: Control process exited, code=exited status=1
Jan 11 16:06:07 cloud systemd[1]: Failed to start OpenVPN connection to server.
Jan 11 16:06:07 cloud systemd[1]: openvpn@server.service: Unit entered failed state.
Jan 11 16:06:07 cloud systemd[1]: openvpn@server.service: Failed with result 'exit-code'.
Jan 12 09:55:35 cloud systemd[1]: Starting OpenVPN connection to server...
Jan 12 09:55:35 cloud ovpn-server[12133]: Current Parameter Settings:
Jan 12 09:55:35 cloud ovpn-server[12133]:   config = '/etc/openvpn/server.conf'
Jan 12 09:55:35 cloud ovpn-server[12133]:   mode = 1
Jan 12 09:55:35 cloud ovpn-server[12133]:   persist_config = DISABLED
Jan 12 09:55:35 cloud ovpn-server[12133]:   persist_mode = 1
Jan 12 09:55:35 cloud ovpn-server[12133]:   show_ciphers = DISABLED
Jan 12 09:55:35 cloud ovpn-server[12133]:   show_digests = DISABLED
Jan 12 09:55:35 cloud systemd[1]: openvpn@server.service: Control process exited, code=exited status=1
Jan 12 09:55:35 cloud systemd[1]: Failed to start OpenVPN connection to server.
Jan 12 09:55:35 cloud systemd[1]: openvpn@server.service: Unit entered failed state.
Jan 12 09:55:35 cloud systemd[1]: openvpn@server.service: Failed with result 'exit-code'.
  • Not sure why you are messing with init.d. Have you tried systemctl start openvpn@server.service? – multithr3at3d Jan 12 '18 at 6:24
  • Check /etc/default/openvpn and please as @multithr3at3d stated, don't change init files. – Lenniey Jan 12 '18 at 9:39
  • I've done that also, it errors out. I will post what it does above. – jfreak53 Jan 12 '18 at 14:56
  • Can you post text rather than screenshots please. – Iain Jan 12 '18 at 15:08
  • 1
    You appear to have the same solvable problem as askubuntu.com/q/747023/778746 – multithr3at3d Jan 12 '18 at 16:40
3

This problem is the same as another posted on Ask! Ubuntu. The fix:

What I have found to work is to comment out the LimitNPROC line in /lib/systemd/system/openvpn@.service.

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.