Wireguard client not starting

My Wireguard (client) is not starting anymore. It has been working for months, but after a full clean reinstall of dietpi and wireguard it’s not working anymore. I have a raspberry pi4 2gb. I get the following message :

root@DietPi:~# systemctl start wg-quick@mlvd-nl1
Job for wg-quick@mlvd-nl1.service failed because the control process exited with error code.
See "systemctl status wg-quick@mlvd-nl1.service" and "journalctl -xe" for details.

Then:

root@DietPi:~# systemctl status wg-quick@mlvd-nl1.service
● wg-quick@mlvd-nl1.service - WireGuard via wg-quick(8) for mlvd/nl1
   Loaded: loaded (/lib/systemd/system/wg-quick@.service; disabled; vendor prese
t: enabled)
   Active: failed (Result: exit-code) since Sun 2020-06-14 15:00:27 B
ST; 39s 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: 716 ExecStart=/usr/bin/wg-quick up mlvd-nl1 (code=exited, sta
tus=127)
 Main PID: 716 (code=exited, status=127)

Jun 14 15:00:26 DietPi wg-quick[716]: [#] ip link add mlvd-nl1 type wireguard
Jun 14 15:00:26 DietPi wg-quick[716]: [#] wg setconf mlvd-nl1 /dev/fd/63
Jun 14 15:00:26 DietPi wg-quick[716]: [#] ip -4 address add 10.65.255.151/32 dev
 mlvd-nl1
Jun 14 15:00:26 DietPi wg-quick[716]: [#] ip link set mtu 1420 up dev mlvd-nl1
Jun 14 15:00:26 DietPi wg-quick[716]: [#] resolvconf -a mlvd-nl1 -m 0 -x
Jun 14 15:00:26 DietPi wg-quick[716]: /usr/bin/wg-quick: line 32: resolvconf: co
mmand not found
Jun 14 15:00:26 DietPi wg-quick[716]: [#] ip link delete dev mlvd-nl1
Jun 14 15:00:27 DietPi systemd[1]: wg-quick@mlvd-nl1.ser
vice: Main process exited, code=exited, status=127/n/a
Jun 14 15:00:27 DietPi systemd[1]: wg-quick@mlvd-nl1.ser
vice: Failed with result 'exit-code'.
Jun 14 15:00:27 DietPi systemd[1]: Failed to start WireG
uard via wg-quick(8) for mlvd/nl1.

Please help!

UPDATE:

I guess resolvconf doesn’t exist anymore…?

Installed openresolve:

sudo apt install openresolv

And now works! Is there somebody who can explain this to me? Never had this problem before…

Hi,

many thanks for your report. Indeed it looks like resolvconf package is not part of latest DietPi RPi image anymore. Therefore it’s missing and WireGuard is not able to start anymore.

I will talk to developer to have resolvconf package installed as WireGuard dependency.

Hey guys, many thanks for reporting. Indeed wg-quick is using resolvconf to set and unset the given DNS server, but the package has it only as soft suggestion: https://packages.debian.org/buster-backports/wireguard-tools
Probably they did not make it a dependency since in server mode it is not required :thinking:. However I’ll make it being installed when installing WireGuard as client via dietpi-software.

Thanks for the explanation! I was just beginning to doubt myself :wink: