Problem starting openvpn-client@service.service

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
cliffhanger
OpenVpn Newbie
Posts: 3
Joined: Thu Dec 06, 2018 9:43 am

Problem starting openvpn-client@service.service

Post by cliffhanger » Thu Dec 06, 2018 4:18 pm

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

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 5095
Joined: Fri Jun 03, 2016 1:17 pm

Re: Problem starting openvpn-client@service.service

Post by TinCanTech » Fri Dec 07, 2018 2:08 pm

cliffhanger wrote:
Thu Dec 06, 2018 4:18 pm
(code=exited, status=210/CHROOT)
I expect you have not chroot'ed correctly, it's tricky to get right and I have never even tried while using systemd.

cliffhanger
OpenVpn Newbie
Posts: 3
Joined: Thu Dec 06, 2018 9:43 am

Re: Problem starting openvpn-client@service.service

Post by cliffhanger » Fri Dec 07, 2018 8:59 pm

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

cliffhanger
OpenVpn Newbie
Posts: 3
Joined: Thu Dec 06, 2018 9:43 am

Re: Problem starting openvpn-client@service.service

Post by cliffhanger » Sat Dec 08, 2018 2:44 pm

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

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 5095
Joined: Fri Jun 03, 2016 1:17 pm

Re: Problem starting openvpn-client@service.service

Post by TinCanTech » Sat Dec 08, 2018 3:04 pm

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.

Post Reply