Problem starting openvpn-client@service.service
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.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 6
- Joined: Thu Dec 06, 2018 9:43 am
Problem starting openvpn-client@service.service
Hello
I'm new to the forum and a newbie to VPN's - bear with me.
I've just installed the latest Openvpn on Ubuntu 16.04 using systemd. Two questions to start:
1) Do I need to start the server service to setup a simple VPN through a provider or whatever?
2) I assume the client service has to be running, at startup, to setup a VPN using a connection manager like Connman or Networkmanger?
I assumed that 2) is true and enabled the service, but get the following errors(journalctl -xe):
openvpn-client@service.service - OpenVPN tunnel for service
Loaded: loaded (/lib/systemd/system/openvpn-client@.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-12-06 15:58:28 GMT; 8s ago
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/w ... n24ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 9018 ExecStart=/usr/sbin/openvpn --suppress-timestamps --nobind --config %i.conf (code=exited, status=210/CHROOT)
Main PID: 9018 (code=exited, status=210/CHROOT)
Dec 06 15:58:28 cliffhangers systemd[1]: Starting OpenVPN tunnel for service...
Dec 06 15:58:28 cliffhangers systemd[9018]: openvpn-client@service.service: Failed at step CHROOT spawning /usr/sbin/openvpn: No such file or directory
Dec 06 15:58:28 cliffhangers systemd[1]: openvpn-client@service.service: Main process exited, code=exited, status=210/CHROOT
Dec 06 15:58:28 cliffhangers systemd[1]: Failed to start OpenVPN tunnel for service.
Dec 06 15:58:28 cliffhangers systemd[1]: openvpn-client@service.service: Unit entered failed state.
Dec 06 15:58:28 cliffhangers systemd[1]: openvpn-client@service.service: Failed with result 'exit-code'
Any ideas here?
I thought this might have been connected to the 'spawn' package. But it seems not. If I run '/usr/sbin/openvpn' from the command line it's functional.
Thanks
Cliff
I'm new to the forum and a newbie to VPN's - bear with me.
I've just installed the latest Openvpn on Ubuntu 16.04 using systemd. Two questions to start:
1) Do I need to start the server service to setup a simple VPN through a provider or whatever?
2) I assume the client service has to be running, at startup, to setup a VPN using a connection manager like Connman or Networkmanger?
I assumed that 2) is true and enabled the service, but get the following errors(journalctl -xe):
openvpn-client@service.service - OpenVPN tunnel for service
Loaded: loaded (/lib/systemd/system/openvpn-client@.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-12-06 15:58:28 GMT; 8s ago
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/w ... n24ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 9018 ExecStart=/usr/sbin/openvpn --suppress-timestamps --nobind --config %i.conf (code=exited, status=210/CHROOT)
Main PID: 9018 (code=exited, status=210/CHROOT)
Dec 06 15:58:28 cliffhangers systemd[1]: Starting OpenVPN tunnel for service...
Dec 06 15:58:28 cliffhangers systemd[9018]: openvpn-client@service.service: Failed at step CHROOT spawning /usr/sbin/openvpn: No such file or directory
Dec 06 15:58:28 cliffhangers systemd[1]: openvpn-client@service.service: Main process exited, code=exited, status=210/CHROOT
Dec 06 15:58:28 cliffhangers systemd[1]: Failed to start OpenVPN tunnel for service.
Dec 06 15:58:28 cliffhangers systemd[1]: openvpn-client@service.service: Unit entered failed state.
Dec 06 15:58:28 cliffhangers systemd[1]: openvpn-client@service.service: Failed with result 'exit-code'
Any ideas here?
I thought this might have been connected to the 'spawn' package. But it seems not. If I run '/usr/sbin/openvpn' from the command line it's functional.
Thanks
Cliff
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Problem starting openvpn-client@service.service
I expect you have not chroot'ed correctly, it's tricky to get right and I have never even tried while using systemd.
-
- OpenVpn Newbie
- Posts: 6
- Joined: Thu Dec 06, 2018 9:43 am
Re: Problem starting openvpn-client@service.service
Thanks for getting back. This is the .conf file under/etc/openvpn:
remote vpn-se8.privatevpn.com 1194 udp
nobind
dev tun
# Options
tun-ipv6
remote-cert-tls server
client
comp-lzo
persist-key
persist-tun
verb 3
# Crypto
cipher AES-128-CBC
auth SHA256
auth-user-pass /etc/openvpn/privatvpn.login
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
# Cert
I assume Chroot is not connected to this? Is this an openvpn problem or systemd?
thanks
Cliff
remote vpn-se8.privatevpn.com 1194 udp
nobind
dev tun
# Options
tun-ipv6
remote-cert-tls server
client
comp-lzo
persist-key
persist-tun
verb 3
# Crypto
cipher AES-128-CBC
auth SHA256
auth-user-pass /etc/openvpn/privatvpn.login
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
# Cert
I assume Chroot is not connected to this? Is this an openvpn problem or systemd?
thanks
Cliff
-
- OpenVpn Newbie
- Posts: 6
- Joined: Thu Dec 06, 2018 9:43 am
Re: Problem starting openvpn-client@service.service
The other thing is why chroot, which I use quite often in a year, would be involved in trying to get a vpn up?
Cliff
Cliff
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Problem starting openvpn-client@service.service
Perhaps your openvpn client log will have some information.
I am using openvpn on ubuntu 16.04 in exactly the same way as you and it is working for me.
I am using openvpn on ubuntu 16.04 in exactly the same way as you and it is working for me.
-
- OpenVpn Newbie
- Posts: 6
- Joined: Thu Dec 06, 2018 9:43 am
Re: Problem starting
Hi
Well stupid me. The problem was the dir placing. Should have been /etc/openvpn/client NOT /etc/openvpn.
I now get
openvpn-client@service.service - OpenVPN tunnel for service
Loaded: loaded (/lib/systemd/system/openvpn-client@.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2018-12-22 21:54:55 GMT; 2s ago
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/w ... n24ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 8821 ExecStart=/usr/sbin/openvpn --suppress-timestamps --nobind --config %i.conf (code=exited, status=1/FAILURE)
Main PID: 8821 (code=exited, status=1/FAILURE)
Dec 22 21:54:55 cliffhangers systemd[1]: Starting OpenVPN tunnel for service...
Dec 22 21:54:55 cliffhangers openvpn[8821]: Options error: In [CMD-LINE]:1: Error opening configuration file: service.conf
Dec 22 21:54:55 cliffhangers openvpn[8821]: Use --help for more information.
Dec 22 21:54:55 cliffhangers systemd[1]: openvpn-client@service.service: Main process exited, code=exited, status=1/FAILURE
Dec 22 21:54:55 cliffhangers systemd[1]: Failed to start OpenVPN tunnel for service.
Dec 22 21:54:55 cliffhangers systemd[1]: openvpn-client@service.service: Unit entered failed state.
Dec 22 21:54:55 cliffhangers systemd[1]: openvpn-client@service.service: Failed with result 'exit-code'
I have a 'conf' file from my provider which works if started manually. How do i get the client service to see this? The 'openvpn-client@service' file is now pointing to the right directory.
thanks
Cliff
Well stupid me. The problem was the dir placing. Should have been /etc/openvpn/client NOT /etc/openvpn.
I now get
openvpn-client@service.service - OpenVPN tunnel for service
Loaded: loaded (/lib/systemd/system/openvpn-client@.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2018-12-22 21:54:55 GMT; 2s ago
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/w ... n24ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 8821 ExecStart=/usr/sbin/openvpn --suppress-timestamps --nobind --config %i.conf (code=exited, status=1/FAILURE)
Main PID: 8821 (code=exited, status=1/FAILURE)
Dec 22 21:54:55 cliffhangers systemd[1]: Starting OpenVPN tunnel for service...
Dec 22 21:54:55 cliffhangers openvpn[8821]: Options error: In [CMD-LINE]:1: Error opening configuration file: service.conf
Dec 22 21:54:55 cliffhangers openvpn[8821]: Use --help for more information.
Dec 22 21:54:55 cliffhangers systemd[1]: openvpn-client@service.service: Main process exited, code=exited, status=1/FAILURE
Dec 22 21:54:55 cliffhangers systemd[1]: Failed to start OpenVPN tunnel for service.
Dec 22 21:54:55 cliffhangers systemd[1]: openvpn-client@service.service: Unit entered failed state.
Dec 22 21:54:55 cliffhangers systemd[1]: openvpn-client@service.service: Failed with result 'exit-code'
I have a 'conf' file from my provider which works if started manually. How do i get the client service to see this? The 'openvpn-client@service' file is now pointing to the right directory.
thanks
Cliff
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Problem starting openvpn-client@service.service
Can you run your openvpn config file without using systemd ?
Something like:
Something like:
Code: Select all
me@home: /root # cd /etc/openvpn/client
me@home: /etc/openvpn/client # openvpn service.conf
-
- OpenVpn Newbie
- Posts: 6
- Joined: Thu Dec 06, 2018 9:43 am
Re: Problem starting openvpn-client@service.service
Yes and get a connection. It's the 'openvpn-client@service' file that is the problem.
Thanks
Thanks
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Problem starting openvpn-client@service.service
TinCanTech wrote: ↑Sun Dec 23, 2018 1:19 amCan you run your openvpn config file without using systemd ?
OK.
The file name is incorrect ..cliffhanger wrote: ↑Sat Dec 22, 2018 10:06 pmOptions error: In [CMD-LINE]:1: Error opening configuration file: service.conf
-
- OpenVpn Newbie
- Posts: 6
- Joined: Thu Dec 06, 2018 9:43 am
Re: Problem starting openvpn-client@service.service
Thanks but I don't have a file called service.conf and when I rename the current configuration file to 'service' it makes no difference. Cliff
-
- OpenVpn Newbie
- Posts: 1
- Joined: Mon Aug 24, 2020 12:05 pm
Re: Problem starting openvpn-client@service.service
Hi cliffhanger!
I've wasted some time today with the same problem on Ubuntu 20. Finally I've found the solution.
There are a lot of systemd magic happening in the background and I've not found any documentation of these OpenVPN related services.
So I can't explain how it works....
But the solution is to start the service like this:
where the "client" is the .conf file name in /etc/openvpn.
You can use any name for the .conf file, just use the same name after the @ in the command.
Alternatively, you can use the
The difference is that it tries to find the config file in '/etc/openvpn/client'. Also this service is disabled by default on Ubuntu 20.
I've wasted some time today with the same problem on Ubuntu 20. Finally I've found the solution.
There are a lot of systemd magic happening in the background and I've not found any documentation of these OpenVPN related services.
So I can't explain how it works....
But the solution is to start the service like this:
Code: Select all
sudo systemctl start openvpn@client
You can use any name for the .conf file, just use the same name after the @ in the command.
Alternatively, you can use the
Code: Select all
sudo systemctl start openvpn-client@client
- Pippin
- Forum Team
- Posts: 1201
- Joined: Wed Jul 01, 2015 8:03 am
- Location: irc://irc.libera.chat:6697/openvpn
Re: Problem starting openvpn-client@service.service
I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp
Halton Arp