google-compute-engine,wireguard,systemd-networkd"/>
  • 8
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

Debian Buster image on a Google Compute Engine VM, and I have this systemd-networkd config placed at /etc/systemd/network/wg0.netdev to configure a Wireguard device:

[NetDev]
Name=wg0
Kind=wireguard

[WireGuard]
PrivateKey = XXXXX
ListenPort = 51820

[WireGuardPeer]
Endpoint = XXXXX:51820
PublicKey = XXXXX
AllowedIPs = XXXXX/32
AllowedIPs = XXXXX/24

When starting the systemd-networkd service, I get this error:

Starting Network Service...
Failed to generate predictable MAC address for wg0: No such file or directory
Could not load configuration files: No such file or directory
systemd-networkd.service: Main process exited, code=exited, status=1/FAILURE

What's odd is:

  1. I can bring up the wg0 interface successfully on the GCP server by configuring it manually instead of via systemd
  2. I can use the above systemd-networkd config on other provider VMs (tested Vultr and local Vagrant) successfully

So the error only happens with the specific combination of using systemd-networkd config on a GCP server.

I'm using the exact same Linux kernel and Wireguard versions on all the servers. If it's a GCP-specific configuration, I can't seem to find any related documentation on it.

      • 1
    • Reviewed your post, that's basically what I've done, except I'm running the ip/wg commands manually instead of through a config file, and all of that works fine on GCP. It's only when I try to convert that setup to systemd-networkd that the problem occurs. One thing I'm doing that's a bit different is assigning an IP address to the wg interface that's not part of any subnet I've configured in GCP, it's just a 10.x.x.x network used for inter-server communication. I wonder if that's where systemd-networkd barfs, trying to get a MAC address for a non-existent subnet in GCP?
      • 2
    • @MaratGainutdinov I was able to successfully fix my issue by installing from the latest images and making sure all packages were up to date. Looks like a fix happened somewhere in the stack, but I don't know where.

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags