0

I used to have a config for openvpn. After upgrading to 18.04 it started behaving differently in relation to systemd, my syslog gets continuously spammed with connection attempts:

ovpn-login[5191]: Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/login.conf
ovpn-login[5191]: Use --help for more information.
systemd[1]: openvpn@login.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: openvpn@login.service: Failed with result 'exit-code'.

The login.conf does not exist and should not exist - I want to clean this up and get rid of the entry so it stops trying to connect to a service that doesn't exist.

I've tried systemctl kill openvpn@login.service, systemctl disable openvpn@login.service both with systemctl daemon-reload afterwards to no avail.

However, there is no file that matches openvpn@login.service anywhere, it is templated from /lib/systemd/system/openvpn-client@.service.

Presumably I need to keep that file around should I want to add some VPN configs in the future. I did try removing it and doing systemctl daemon-reload as per an answer elsewhere on StackExchange, again, to no avail.

How do I get rid of this spurious systemd configuration entry?


Edit: even after apt purge openvpn and trying to remove all traces it still has:

openvpn@login.service: Failed to schedule restart job: Unit openvpn@login.service not found.

Where is it picking this up from?

0

Check the /etc/default/openvpn file to see if you've got it in the AUTOSTART section, eg. AUTOSTART="login". If not, the default is "all" in your openvpn path, eg. /etc/openvpn/. Any .conf file in that directory will trigger an attempt at starting that specifically named service. For example, /etc/openvpn/login.conf.

I just had this exact same problem happen to me with my upgrade to 18.04. All of a sudden it tried to start every .conf file in my openvpn directory as an openvpn tunnel.

If your auth-user-pass in your vpn config file just so happens to be pointing to login.config, you'll need to rename that to something like login.secret to keep this from happening. Or just name the AUTOSTART='myvpn' in /etc/default/openvpn to match your myvpn.conf for your vpn connection in /etc/openvpn/.

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.