PiVPN service cannot be started

Creating a bug report/issue

Required Information

  • DietPi version | v8.9.2
  • Distro version | Bullseye 1
  • Kernel version | Linux DietPi 5.15.61-v7l+ #1579 SMP Fri Aug 26 11:13:03 BST 2022 armv7l GNU/Linux
  • SBC model | `RPI4
  • Power supply used | '5V 3000mA
  • SD card used | (Sandisk ultra 32GB)

Additional Information (if applicable)

  • Software title | PiVPN)
  • Was the software title installed freshly or updated/migrated? Freshly
  • Can this issue be replicated on a fresh installation of DietPi? I think so
Oct 20 18:07:12 DietPi systemd[2058]: dietpi-vpn.service: Failed at step EXEC spawning /usr/sbin/openvpn: No such file or directory
Oct 20 18:07:12 DietPi systemd[1]: dietpi-vpn.service: Main process exited, code=exited, status=203/EXEC
Oct 20 18:07:12 DietPi systemd[1]: dietpi-vpn.service: Failed with result 'exit-code'.
Oct 20 18:07:12 DietPi systemd[1]: Failed to start VPN Client (DietPi).

Steps to reproduce

On a fresh Dietpi installation I have installed:
-PiHole and unbound
-PiVPN

Expected behaviour

I think the service PiVPN should be running after a restart, but it doesn’t

Actual behaviour

- ...

I see in the dashboard that PiVPN is not running. When starting it, the error log can be shown.

Thanks for thinking with me.

Regards,
Hans

What exactly you are trying to do? Did you try to start dietpi-vpn service?

dietpi-vpn is a client application and not a server like PiVPN is.

Which Dashboard? What exactly you see? Where?

PiVPN is not an own software or service. It is a wrapper for OpenVPN server or Wireguard Server.

Btw: which server you have installed using PiVPN installer? Wireguard or OpenVPN?

HI,
Hi

Thanks for your response

What exactly you are trying to do? Did you try to start dietpi-vpn service?
Yes
dietpi-vpn is a client application and not a server like PiVPN is
OK
Which Dashboard? What exactly you see? Where?
The DiePti dashboard
which server you have installed using PiVPN installer? Wireguard or OpenVPN?
Wiregard

I Think I got it installed OK.
On my other RP its working OK, but ther I am have troubles update DietPi.

Regards,
Hans

So there is no problem with PiVPN if dietpi-vpn does not start, because these are two different things :slight_smile:
But you are unable to connect to your Wireguard server or what is the problem?

If you are confrontet with errors and/or problems while running dietpi-update please open a new topic.

1 Like

to check Wiregaurd, you can do following

systemctl status wg-quick@wg0.service
journalctl -u wg-quick@wg0.service

This seems OK.

root@DietPi:~# systemctl status wg-quick@wg0.service
â—Ź wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
     Loaded: loaded (/lib/systemd/system/wg-quick@.service; enabled; vendor preset: enabled)
     Active: active (exited) since Thu 2022-10-20 17:52:08 CEST; 24h ago
       Docs: man:wg-quick(8)
             man:wg(8)
             https://www.wireguard.com/
             https://www.wireguard.com/quickstart/
             https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8
             https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
    Process: 456 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=0/SUCCESS)
   Main PID: 456 (code=exited, status=0/SUCCESS)
        CPU: 78ms

Oct 20 17:52:07 DietPi systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
Oct 20 17:52:07 DietPi wg-quick[456]: [#] ip link add wg0 type wireguard
Oct 20 17:52:08 DietPi wg-quick[456]: [#] wg setconf wg0 /dev/fd/63
Oct 20 17:52:08 DietPi wg-quick[456]: [#] ip -4 address add 10.1.241.1/24 dev wg0
Oct 20 17:52:08 DietPi wg-quick[456]: [#] ip link set mtu 1420 up dev wg0
Oct 20 17:52:08 DietPi systemd[1]: Finished WireGuard via wg-quick(8) for wg0.
root@DietPi:~# journalctl -u wg-quick@wg0.service
-- Journal begins at Wed 2022-10-19 21:17:01 CEST, ends at Fri 2022-10-21 17:59:13 CEST. --
Oct 20 17:52:07 DietPi systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
Oct 20 17:52:07 DietPi wg-quick[456]: [#] ip link add wg0 type wireguard
Oct 20 17:52:08 DietPi wg-quick[456]: [#] wg setconf wg0 /dev/fd/63
Oct 20 17:52:08 DietPi wg-quick[456]: [#] ip -4 address add 10.1.241.1/24 dev wg0
Oct 20 17:52:08 DietPi wg-quick[456]: [#] ip link set mtu 1420 up dev wg0
Oct 20 17:52:08 DietPi systemd[1]: Finished WireGuard via wg-quick(8) for wg0.

yes seems running fine. Connections can be checked using PiVPN CLI or just running native wg command.

Thanks for your reaction.
It all seems to work OK, but I can’t get my mobile devices connected to VPN.
I have got to figure out where this is caused by.

Thanks again for your effort.

Regards,
Hans