From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: henningreich@gmail.com Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 20c45acd for ; Wed, 7 Feb 2018 08:58:27 +0000 (UTC) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id a3eb37c2 for ; Wed, 7 Feb 2018 08:58:27 +0000 (UTC) Received: by mail-io0-f169.google.com with SMTP id m11so1237475iob.2 for ; Wed, 07 Feb 2018 01:04:24 -0800 (PST) MIME-Version: 1.0 Sender: henningreich@gmail.com From: Henning Reich Date: Wed, 7 Feb 2018 10:03:43 +0100 Message-ID: Subject: wg-quick systemd service does not work directly after boot To: wireguard@lists.zx2c4.com Content-Type: multipart/alternative; boundary="001a113fe188db9e7505649b9410" List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --001a113fe188db9e7505649b9410 Content-Type: text/plain; charset="UTF-8" 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@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@wg0.service: Main process exited, code=exited, status=1/FAILURE Feb 07 08:15:14 domain.de systemd[1]: wg-quick@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@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 --001a113fe188db9e7505649b9410 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 (syst= emctl enable wg-quick@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-q= uick(8) for wg0...
Feb 07 08:15:14 doma= in.de wg-quick[335]: [#] ip link add wg0 type wireguard
Fe= b 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 par= sing 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@wg0.service: = Main process exited, code=3Dexited, status=3D1/FAILURE
Feb 07 08:= 15:14 domain.de systemd[1]: wg-quick@wg0.s= ervice: Failed with result 'exit-code'.
Feb 07 08:15:14 <= a href=3D"http://domain.de">domain.de systemd[1]: Failed to start WireG= uard via wg-quick(8) for wg0.

It looks for m= e 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 rest= art wg-quick@wg0" it works as expected, so my workaround is to add a &= #39;sleep 5' to the service file.=C2=A0

Any be= tter solutions or is this a "bug"?=C2=A0

Merci


--001a113fe188db9e7505649b9410--