gravitl / netmaker

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

Joining network on netmaker server #920

Closed doodlemania2 closed 2 years ago

doodlemania2 commented 2 years ago

Contact Details

argo_martin@hotmail.com

What happened?

I'm following the FAQ on joining the VPS to a network hosted by the docker netmaker on the same VPS (other servers join just fine).

wireguard wireguard is installed wireguard-tools wireguard-tools is installed OS Version = Linux Netclient Version = v0.12.0 Binary = netclient Downloading netclient v0.12.0 2022-03-18 21:55:31 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/351486934/1aec3bdc-64b8-429b-b51e-c6ff7ce59dc2?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220318%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220318T215530Z&X-Amz-Expires=300&X-Amz-Signature=04ab19fbb07e0175382be290335d0ce29970ffbaf93c40c80dab9f2d30353eaf&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=351486934&response-content-disposition=attachment%3B%20filename%3Dnetclient&response-content-type=application%2Foctet-stream [17901445/17901445] -> "netclient" [1] 2022/03/18 21:55:31 [netclient] joining GSbNRsph at grpc.:443 2022/03/18 21:55:31 [netclient] node created on remote server...updating configs 2022/03/18 21:55:31 [netclient] sent a node update to server for nodepet-meercat, 36fa2d94-f303-48fc-bba5-ee6f6b2453e3 2022/03/18 21:55:31 [netclient] retrieving peers 2022/03/18 21:55:31 [netclient] starting wireguard 2022/03/18 21:55:32 [netclient] waiting for interface... 2022/03/18 21:55:32 [netclient] interface ready - netclient.. ENGAGE 2022/03/18 21:55:32 [netclient] joining doodlenet at grpc.:443 2022/03/18 21:55:32 [netclient] node created on remote server...updating configs

But netclient just stops at that last line - it never completes the process.

Version

v0.12.0

What OS are you using?

Linux

Relevant log output

Above

Contributing guidelines

doodlemania2 commented 2 years ago

Quick follow up - when I go to remove it to try again, I do see some interesting bits:

root@doodlecloud:~# ./netclient uninstall 2022/03/18 22:03:49 [netclient] uninstalling netclient... 2022/03/18 22:03:49 [netclient] removed machine from GSbNRsph network on remote server 2022/03/18 22:03:49 [netclient] removed WireGuard interface: nm-GSbNRsph 2022/03/18 22:03:49 [netclient] removed GSbNRsph network locally 2022/03/18 22:03:50 [netclient] removed machine from doodlenet network on remote server 2022/03/18 22:03:50 [netclient] could not flush peer routes when leaving network, doodlenet 2022/03/18 22:03:50 [netclient] error running command: wg-quick down /etc/netclient/config/nm-doodlenet.conf 2022/03/18 22:03:50 [netclient] wg-quick: `/etc/netclient/config/nm-doodlenet.conf' does not exist 2022/03/18 22:03:50 [netclient] removed doodlenet network locally 2022/03/18 22:03:51 [netclient] removed systemd remnants if any existed 2022/03/18 22:03:51 [netclient] Removing netclient binary: remove /sbin/netclient: no such file or directory 2022/03/18 22:03:51 [netclient] uninstalled netclient

Note that it never creates the config for doodlenet so that interface never comes up. It does, however, get registered in netmaker.

doodlemania2 commented 2 years ago

Hmmm - debugging as I go - was able to join the network via netclient join -t <token> --port 51835 and that shows successful, however, the other nodes cannot reach it. Still debugging.

doodlemania2 commented 2 years ago

After a successful join, I'm not able to ping any other node (as stated above), but also, cannot ping the netmaker node (container) from the VPS: root@doodlecloud:/home/derek# ping 10.11.12.254 PING 10.11.12.254 (10.11.12.254) 56(84) bytes of data. From 10.11.12.9 icmp_seq=1 Destination Host Unreachable ping: sendmsg: Required key not available

doodlemania2 commented 2 years ago

Fixed by adding udpholepunch no to the join command :)