wg-quick systemd service does not work directly after boot

Henning Reich henning.reich at gmail.com
Wed Feb 7 10:03:43 CET 2018


Hi,

I'm not sure if this a problem of wg/wg-quick or my system but maybe
somebody can help.

I have a wg0.conf for wg-quick and enabled the systemd service (systemctl
enable wg-quick at wg0).
After a reboot, I have the following status of this service:
--
Feb 07 08:15:13 domain.de systemd[1]: Starting WireGuard via wg-quick(8)
for wg0...
Feb 07 08:15:14 domain.de wg-quick[335]: [#] ip link add wg0 type wireguard
Feb 07 08:15:14 domain.de wg-quick[335]: [#] wg setconf wg0 /dev/fd/63
Feb 07 08:15:14 domain.de wg-quick[335]: Name or service not known: `
remote.de:25555'
Feb 07 08:15:14 domain.de wg-quick[335]: Configuration parsing error
Feb 07 08:15:14 domain.de wg-quick[335]: [#] ip link delete dev wg0
Feb 07 08:15:14 domain.de systemd[1]: wg-quick at wg0.service: Main process
exited, code=exited, status=1/FAILURE
Feb 07 08:15:14 domain.de systemd[1]: wg-quick at wg0.service: Failed with
result 'exit-code'.
Feb 07 08:15:14 domain.de systemd[1]: Failed to start WireGuard via
wg-quick(8) for wg0.

It looks for me like wireguard can't resolve my remote site at this moment.
I tried a static resolv.conf file and also systemd-resolved. Both sites
have dynamic IPs so I can't use direct IPs.
If I run "systemctl restart wg-quick at wg0" it works as expected, so my
workaround is to add a 'sleep 5' to the service file.

Any better solutions or is this a "bug"?

Merci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/wireguard/attachments/20180207/989f2e9c/attachment.html>


More information about the WireGuard mailing list