Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Henning Reich <henning.reich@gmail.com>
To: wireguard@lists.zx2c4.com
Subject: wg-quick systemd service does not work directly after boot
Date: Wed, 7 Feb 2018 10:03:43 +0100	[thread overview]
Message-ID: <CAOAVeL3iu+xrhSLdNcLkR7X0nLQz8Uyb+dGAeecFtv3ArL=7Pw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 4291 bytes --]

             reply	other threads:[~2018-02-07  8:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07  9:03 Henning Reich [this message]
2018-02-07 12:08 ` Celti Burroughs
2018-02-07 11:54 Mytril
2018-02-07 13:06 ` Matthias Urlichs
2018-02-08 19:14   ` jugs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOAVeL3iu+xrhSLdNcLkR7X0nLQz8Uyb+dGAeecFtv3ArL=7Pw@mail.gmail.com' \
    --to=henning.reich@gmail.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).