Service is running and another instance tries to start

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
KevinOb75
OpenVpn Newbie
Posts: 2
Joined: Mon May 03, 2021 7:30 pm

Service is running and another instance tries to start

Post by KevinOb75 » Mon May 03, 2021 7:35 pm

Hi,

I think it's more a linux command question, sorry in advance.

I have the following message every 5 sec in my logs (cmd: journalctl -f)
=> "Failed to start OpenVPN connection to ovpn".

Openvpn seems to be running ok (cmd: sudo systemctl status openvpn)
=> Active: active (exited)
And indeed I can use it.

How can I check where does the failing instance come from and disable it?

Thank you.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Service is running and another instance tries to start

Post by TinCanTech » Mon May 03, 2021 8:18 pm

Openvpn do not support systemd openvpn.service any longer.

You should use openvpn-server@.service or openvpn-client@.service

Your service is simply trying to start all config files in /etc/openvpn, so remove the ones you are not using.

KevinOb75
OpenVpn Newbie
Posts: 2
Joined: Mon May 03, 2021 7:30 pm

Re: Service is running and another instance tries to start

Post by KevinOb75 » Tue May 04, 2021 8:28 am

You were right TinCanTech, I renamed the 2nd file to *.bak, but now I have errors because the file doesn't exist anymore. How can I remove it from startup?

I tried sudo service openvpn@ovpn.service disable


May 04 11:32:03 raspberrypi systemd[1]: openvpn@ovpn.service: Service RestartSec=5s expired, scheduling restart.
May 04 11:32:03 raspberrypi systemd[1]: openvpn@ovpn.service: Scheduled restart job, restart counter is at 327.
May 04 11:32:03 raspberrypi systemd[1]: Stopped OpenVPN connection to ovpn.
May 04 11:32:03 raspberrypi systemd[1]: Starting OpenVPN connection to ovpn...
May 04 11:32:03 raspberrypi ovpn-ovpn[19213]: Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/ovpn.conf

Post Reply