Wireguard service fails to start on Pi reboot Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Totila
Posts: 25
Joined: Sun Aug 04, 2019 8:29 am

Wireguard service fails to start on Pi reboot

Post by Totila »

Hi there,
As the title says.

Log:

Code: Select all

-- Logs begin at Thu 2016-11-03 18:16:42 CET, end at Mon 2020-08-03 10:55:03 CEST. --
Aug 03 10:44:31 DietPi systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
Aug 03 10:44:31 DietPi wg-quick[615]: [#] ip link add wg0 type wireguardAug 03 10:44:31 DietPi wg-quick[615]: [#] wg setconf wg0 /dev/fd/63
Aug 03 10:44:31 DietPi wg-quick[615]: [#] ip -4 address add 10.9.0.1/24 dev wg0
Aug 03 10:44:31 DietPi wg-quick[615]: [#] ip -6 address add fd86::1/64 dev wg0
Aug 03 10:44:31 DietPi wg-quick[615]: [#] ip link set mtu 1420 up dev wg0
Aug 03 10:44:31 DietPi wg-quick[615]: [#] sysctl net.ipv4.conf.wg0.forwarding=1 net.ipv4.conf.$(sed -n 3p /run/dietpi/.network).forwarding=1
Aug 03 10:44:31 DietPi wg-quick[615]: sed: can't read /run/dietpi/.network: No such file or directory
Aug 03 10:44:31 DietPi wg-quick[615]: net.ipv4.conf.wg0.forwarding = 1
Aug 03 10:44:31 DietPi wg-quick[615]: sysctl: separators should not be repeated: ..forwarding
Aug 03 10:44:31 DietPi wg-quick[615]: sysctl: cannot stat /proc/sys/net/ipv4/conf//forwarding: No such file or directory
Aug 03 10:44:31 DietPi wg-quick[615]: [#] ip link delete dev wg0
Aug 03 10:44:31 DietPi systemd[1]: wg-quick@wg0.service: Main pr
ocess exited, code=exited, status=255/n/a
Aug 03 10:44:31 DietPi systemd[1]: Failed to start WireGuard via
 wg-quick(8) for wg0.
Aug 03 10:44:31 DietPi systemd[1]: wg-quick@wg0.service: Unit en
tered failed state.
Aug 03 10:44:31 DietPi systemd[1]: wg-quick@wg0.service: Failed
with result 'exit-code'.
Restarting the service manually after reboot via systemctl restart wg-quick@wg0 works though.

Any Idea?

Many thanks in advance.
User avatar
Joulinar
Posts: 2072
Joined: Sat Nov 16, 2019 12:49 am

Re: Wireguard service fails to start on Pi reboot

Post by Joulinar »

Hi,

many thanks for your message. Should be similar to this viewtopic.php?p=26073#p26073
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Totila
Posts: 25
Joined: Sun Aug 04, 2019 8:29 am

Re: Wireguard service fails to start on Pi reboot

Post by Totila »

Many thanks for the swift reply.

I tried and it is working (again).

Thanks you.
Post Reply