I have OpenVPN server on Ubuntu 18.04 . I install it from webmin module before.
After the upgrade(only install updates) and reboot , I received an error loading the configuration of which is not. From directory \etc\openvpn\server.conf .
in this directory I have another configuration file that is created from the webmin environment. I got this information from syslog.
This file was not previously, since I did not create it.Because webmin allows you to create conf file for server.
Is this path standard and where is it written?
This event led to the fact that within 3 hours the openvpn service could not start correctly and accessed this file. Restarting the service from a certain time allowed to boot correctly.
How can I correct this situation in the future?
Service dont work after upgrade.
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
-
- OpenVpn Newbie
- Posts: 9
- Joined: Mon Sep 03, 2018 1:28 pm
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Service dont work after upgrade.
What upgrade precisely ?
-
- OpenVpn Newbie
- Posts: 9
- Joined: Mon Sep 03, 2018 1:28 pm
Re: Service dont work after upgrade.
А package update was launched.
After the restart, error messages appeared.
the service is currently running, but the error is being written to syslog.
i start openvpn with command : /etc/init.d/openvpn start
if you look at the status of the work, then the following situation:
systemctl status openvpn@server.service
<● openvpn@server.service - OpenVPN connection to server
Loaded: loaded (/lib/systemd/system/openvpn@.service; indirect; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2019-10-28 17:18:06 MSK; 1s ago
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/w ... n24ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 22635 ExecStart=/usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/server.conf --writepid /run/openvpn/server.pid (code=exited, status=1/FA
Main PID: 22635 (code=exited, status=1/FAILURE)
окт 28 17:18:06 openvpn systemd[1]: openvpn@server.service: Main process exited, code=exited, status=1/FAILURE
окт 28 17:18:06 openvpn systemd[1]: openvpn@server.service: Failed with result 'exit-code'.
окт 28 17:18:06 openvpn systemd[1]: Failed to start OpenVPN connection to server.
>
/etc/init.d/openvpn status
<● openvpn.service - OpenVPN service
Loaded: loaded (/lib/systemd/system/openvpn.service; enabled; vendor preset: enabled)
Active: active (exited) since Mon 2019-10-28 08:54:48 MSK; 4h 24min ago
Process: 1019 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 1019 (code=exited, status=0/SUCCESS)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
>
If view process then:
ps aux | grep openvpn
nobody 994 0.0 0.3 45260 7656 ? Ss 08:54 0:04 /usr/sbin/openvpn --daemon ovpn-vpn-01-yarcloud-ru --status /run/openvpn/vpn-01-yarcloud-ru.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/vpn-01-yarcloud-ru.conf --writepid /run/openvpn/vpn-01-yarcloud-ru.pid
root 22745 0.0 0.0 14356 1144 pts/0 S+ 17:21 0:00 grep --color=auto openvpn
After the restart, error messages appeared.
the service is currently running, but the error is being written to syslog.
i start openvpn with command : /etc/init.d/openvpn start
if you look at the status of the work, then the following situation:
systemctl status openvpn@server.service
<● openvpn@server.service - OpenVPN connection to server
Loaded: loaded (/lib/systemd/system/openvpn@.service; indirect; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2019-10-28 17:18:06 MSK; 1s ago
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/w ... n24ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 22635 ExecStart=/usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/server.conf --writepid /run/openvpn/server.pid (code=exited, status=1/FA
Main PID: 22635 (code=exited, status=1/FAILURE)
окт 28 17:18:06 openvpn systemd[1]: openvpn@server.service: Main process exited, code=exited, status=1/FAILURE
окт 28 17:18:06 openvpn systemd[1]: openvpn@server.service: Failed with result 'exit-code'.
окт 28 17:18:06 openvpn systemd[1]: Failed to start OpenVPN connection to server.
>
/etc/init.d/openvpn status
<● openvpn.service - OpenVPN service
Loaded: loaded (/lib/systemd/system/openvpn.service; enabled; vendor preset: enabled)
Active: active (exited) since Mon 2019-10-28 08:54:48 MSK; 4h 24min ago
Process: 1019 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 1019 (code=exited, status=0/SUCCESS)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
>
If view process then:
ps aux | grep openvpn
nobody 994 0.0 0.3 45260 7656 ? Ss 08:54 0:04 /usr/sbin/openvpn --daemon ovpn-vpn-01-yarcloud-ru --status /run/openvpn/vpn-01-yarcloud-ru.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/vpn-01-yarcloud-ru.conf --writepid /run/openvpn/vpn-01-yarcloud-ru.pid
root 22745 0.0 0.0 14356 1144 pts/0 S+ 17:21 0:00 grep --color=auto openvpn
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Service dont work after upgrade.
You are using systemd so you should be using systemctl to control your processes not /etc/init.d/openvpn
-
- OpenVpn Newbie
- Posts: 9
- Joined: Mon Sep 03, 2018 1:28 pm
Re: Service dont work after upgrade.
Do you see that the configuration that I specified is not starting correctly?
/etc/openvpn/server.conf from systemd
and / etc / openvpn / vpn -...
The latter is my server configuration.
So how will the launch occur if systemd accesses another config?
--
I looked at the startup method and realized my error:
openvpn-client - means to run the config from the folder / etc / openvpn / client, and @client means to run the config called client. Accordingly, in the same way, we can upload all the files to the server folder and start with the systemctl start openvpn-server @ client command.
If I execute the command systemctl status openvpn @ server.service, then I start the server from the config "server" (server.conf)
----------
is't it?
I also forgot to add that I have 2 instances running for some reason. This is actively written in the log. where is mistake here?
/etc/openvpn/server.conf from systemd
and / etc / openvpn / vpn -...
The latter is my server configuration.
So how will the launch occur if systemd accesses another config?
--
I looked at the startup method and realized my error:
openvpn-client - means to run the config from the folder / etc / openvpn / client, and @client means to run the config called client. Accordingly, in the same way, we can upload all the files to the server folder and start with the systemctl start openvpn-server @ client command.
If I execute the command systemctl status openvpn @ server.service, then I start the server from the config "server" (server.conf)
----------
is't it?
I also forgot to add that I have 2 instances running for some reason. This is actively written in the log. where is mistake here?
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Service dont work after upgrade.
OpenVPN has changed the way it uses systemd unit files and consequently there is some confusion.
You need to use the following unit files:
You need to use the following unit files:
- Client config files belong in /etc/openvpn/client and use openvpn-client@.service
Code: Select all
systemctl start openvpn-client@my-client
- Server config files belong in /etc/openvpn/server and use openvpn-server@.service
Code: Select all
systemctl start openvpn-server@my-server