gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.5k stars 552 forks source link

GCP VM Error creating interface while trying to join to network #191

Closed franciscosuca closed 3 years ago

franciscosuca commented 3 years ago

I am trying to connect to the server using a virtual machine from the google cloud platform (GCP), but after following the quick-start guide I get the following errors :

2021/07/01 16:51:23 attempting to joining k3s at 34.141.99.177:50051 RTNETLINK answers: Operation not supported Error creating interface Cannot find device "nm-k3s" Error adding address Device does not exist: file does not exist Device does not exist: file does not exist Cannot find device "nm-k3s" Cannot find device "nm-k3s" 2021/07/01 16:51:24 Error installing: exit status 1 2021/07/01 16:51:24 Removed machine from k3s network on remote server Cannot find device "nm-k3s" 2021/07/01 16:51:24 exit status 1 2021/07/01 16:51:24 Unable to wipe local config: exit status 1 2021/07/01 16:51:24 Error disabling netclient@.service. Please investigate. 2021/07/01 16:51:24 exit status 1 2021/07/01 16:51:24 Error stopping netclient-k3s.timer. Please investigate. 2021/07/01 16:51:24 exit status 5 2021/07/01 16:51:24 Error disabling netclient-k3s.timer. Please investigate. 2021/07/01 16:51:24 exit status 1 2021/07/01 16:51:24 Error removing file. Please investigate. 2021/07/01 16:51:24 exit status 1 2021/07/01 16:51:24 Error disabling netclient@.service. Please investigate. 2021/07/01 16:51:24 exit status 1 2021/07/01 16:51:24 Error stopping netclient-k3s.timer. Please investigate. 2021/07/01 16:51:24 exit status 5 2021/07/01 16:51:24 Error disabling netclient-k3s.timer. Please investigate. 2021/07/01 16:51:24 exit status 1 2021/07/01 16:51:24 Error removing file. Please investigate. 2021/07/01 16:51:24 exit status 1


Replicate scenario:

  1. Installed wireguard apt install wireguard
  2. Join the network using curl -sfL https://raw.githubusercontent.com/gravitl/netmaker/v0.5/scripts/netclient-install.slim.sh | KEY=MY_TOKEN
cmprmsd commented 3 years ago

You are either missing the Wireguard kernel module (OPENVZ e.g. does not include it in many VPS e.g.) or you use boringtun (which is a userland implementation of Wireguard).

@afeiszli There are userland implementations of Wireguard which can be called with the following wg-quick command example for a Wireguard tunnel based on boringtun:

WG_SUDO=1 WG_QUICK_USERSPACE_IMPLEMENTATION=boringtun wg-quick up wg0

Any chance to patch this into netmaker? It will help to integrate many VPS providers that do not allow the kernel module Wireguard.

Thanks in advance!

afeiszli commented 3 years ago

@cmprmsd we do want to switch to using wg-quick. It would make management a lot easier. Right now we are using the official golang package wgctrl which seems to be lacking in some functionality. It will take some refactoring to use wg-quick but we'll get that roadmapped.

afeiszli commented 3 years ago

@franciscosuca have you checked your wireguard implementation like @cmprmsd is mentioning?

Also, what is your base operating system?

Try running this manually. It will confirm if wireguard interface type is not available on your host:

sudo ip link add dev helloworld type wireguard sudo ip link show

(if it succeeds you can remove with "sudo ip link del helloworld")

afeiszli commented 3 years ago

Closing as there has been no response. Feel free to reopen with response.