Opened 9 months ago

Closed 8 months ago

#1353 closed Bug / Defect (notabug)

Options error: In [CMD-LINE]:1: Error opening configuration file: server.conf

Reported by: wpyung Owned by:
Priority: major Milestone:
Component: Generic / unclassified Version: OpenVPN 2.4.4 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc: Samuli Seppänen, David Sommerseth, berniv6

Description

I'm pretty sure I've got this issue: https://github.com/Nyr/openvpn-install/issues/654

If you scroll to the end of the post you see ratijas commented on 6 Jul:

"I think the we found here is the issue with openvpn packaging and systemd integration, and should be reported to OpenVPN repository instead."

Does anyone know if this issue has been fixed ?
If so which version should be used for Ubuntu ?

I am using openvpn candidate 2.4.4-2ubuntu1.3

This is being used by our small company so that people can work remotely from home.

We are getting repeated messages in log as shown below, approximately every 5 seconds.

The connection is up and running and in active use.
However the connection drops for a few seconds occasionally, but the log is swamped with these error messages so is difficult to use for troubleshooting.

Nov 11 16:11:28 vm8 systemd[1]: openvpn-server@…: Service hold-off time over, scheduling restart.
Nov 11 16:11:28 vm8 systemd[1]: openvpn-server@…: Scheduled restart job, restart counter is at 4034009.
Nov 11 16:11:28 vm8 systemd[1]: Stopped OpenVPN service for server.service.
Nov 11 16:11:28 vm8 systemd[1]: Starting OpenVPN service for server.service...
Nov 11 16:11:28 vm8 openvpn[11582]: Options error: In [CMD-LINE]:1: Error opening configuration file: server.service.conf
Nov 11 16:11:28 vm8 openvpn[11582]: Use --help for more information.
Nov 11 16:11:28 vm8 systemd[1]: openvpn-server@…: Main process exited, code=exited, status=1/FAILURE
Nov 11 16:11:28 vm8 systemd[1]: openvpn-server@…: Failed with result 'exit-code'.
Nov 11 16:11:28 vm8 systemd[1]: Failed to start OpenVPN service for server.service.

Change History (2)

comment:1 Changed 8 months ago by Gert Döring

Cc: Samuli Seppänen David Sommerseth berniv6 added

Well, no idea about systemd. But copying in people who understand debian/ubuntu and systemd, so more wisdom might come from there.

Generally speaking, all problems that are specific to a distribution-provided package need to be addressed to that distribution first. We do provide the code, but not the packaging for Ubuntu.

@berniv6, do you know if Ubuntu uses the Debian package? Or something own?

comment:2 Changed 8 months ago by David Sommerseth

Resolution: notabug
Status: newclosed

The error is pretty clear:

Options error: In [CMD-LINE]:1: Error opening configuration file: server.service.conf
...
​openvpn-server@server.service.service: Main process exited, code=exited, status=1/FAILURE

This is due to using openvpn-server@server.service.service as the systemd unit name. This is quite odd.

If the server configuration is saved as /etc/openvpn/server/tun0.conf, then the correct systemctl command line would be: systemctl start openvpn-server@tun0, alternatively systemctl start openvpn-server@tun0.service.

The configuration file must have a .conf extension. More details on the systemd implementation can be found here: https://github.com/OpenVPN/openvpn/blob/master/distro/systemd/README.systemd

Note: See TracTickets for help on using tickets.