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

unknown reason status:ERROR in ui , but node alives. #141

Closed changchichung closed 2 years ago

changchichung commented 3 years ago

OS: ubuntu 18.04.2 x64 this node is also running netmaker-server in docker. when the service just started , I can see the node with status: HEALTHY in netmaker-ui but after a while , status changes to WARN , and then eventually ERROR. but even with status error , this node still alives and be able to ping other nodes.

node ping to other nodes

ip a
84: nm-testvpn: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
    link/none 
    inet 10.1.0.2/24 scope global nm-testvpn

ping other nodes

021-05-06 10:23:10 [chchang@ws ~]$ ping 10.1.0.1
PING 10.1.0.1 (10.1.0.1) 56(84) bytes of data.
64 bytes from 10.1.0.1: icmp_seq=1 ttl=64 time=205 ms
64 bytes from 10.1.0.1: icmp_seq=2 ttl=64 time=205 ms
^C
--- 10.1.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 205.588/205.734/205.880/0.146 ms
2021-05-06 10:24:07 [chchang@ws ~]$ ping 10.1.0.3
PING 10.1.0.3 (10.1.0.3) 56(84) bytes of data.
64 bytes from 10.1.0.3: icmp_seq=1 ttl=64 time=191 ms
64 bytes from 10.1.0.3: icmp_seq=2 ttl=64 time=189 ms
^C
--- 10.1.0.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 189.005/190.019/191.033/1.014 ms

status: ERROR in ui

journal log shows nothing error

May 06 09:33:06 ws.cowbay.org netclient[17793]: Registering with GRPC Server
May 06 09:33:06 ws.cowbay.org netclient[17793]: Authenticating with GRPC Server
May 06 09:33:06 ws.cowbay.org netclient[17793]: Parsing peers response
May 06 09:33:06 ws.cowbay.org netclient[17793]: Peer is self. Skipping
May 06 09:33:06 ws.cowbay.org netclient[17793]: Finished parsing peers response
May 06 09:33:06 ws.cowbay.org netclient[17793]: beginning local WG config
May 06 09:33:06 ws.cowbay.org netclient[17793]: setting local settings
May 06 09:33:06 ws.cowbay.org netclient[17793]: setting WG config from node and peers
May 06 09:33:06 ws.cowbay.org netclient[17793]: configuring WG device
May 06 09:33:06 ws.cowbay.org netclient[17793]: Running command: iptables -D FORWARD -i nm-testvpn -j ACCEPT
May 06 09:33:06 ws.cowbay.org netclient[17793]: Running command: iptables -t nat -D POSTROUTING -o br-41b5539c1a80 -j MA
May 06 09:33:06 ws.cowbay.org netclient[17793]: Running command: iptables -A FORWARD -i nm-testvpn -j ACCEPT
May 06 09:33:06 ws.cowbay.org netclient[17793]: Running command: iptables -t nat -A POSTROUTING -o br-41b5539c1a80 -j MA
May 06 09:33:06 ws.cowbay.org netclient[17793]: Server has requested that node update peer list.
May 06 09:33:06 ws.cowbay.org netclient[17793]: Updating peer list from remote server.
May 06 09:33:06 ws.cowbay.org netclient[17793]: Registering with GRPC Server
May 06 09:33:06 ws.cowbay.org netclient[17793]: Authenticating with GRPC Server
May 06 09:33:06 ws.cowbay.org netclient[17793]: Parsing peers response
May 06 09:33:06 ws.cowbay.org netclient[17793]: Peer is self. Skipping
May 06 09:33:06 ws.cowbay.org netclient[17793]: Finished parsing peers response
May 06 09:33:06 ws.cowbay.org netclient[17793]: beginning local WG config
May 06 09:33:06 ws.cowbay.org netclient[17793]: setting local settings
May 06 09:33:06 ws.cowbay.org netclient[17793]: setting WG config from node and peers
May 06 09:33:06 ws.cowbay.org netclient[17793]: configuring WG device
May 06 09:33:06 ws.cowbay.org netclient[17793]: Running command: iptables -D FORWARD -i nm-testvpn -j ACCEPT
May 06 09:33:06 ws.cowbay.org netclient[17793]: Running command: iptables -t nat -D POSTROUTING -o br-41b5539c1a80 -j MA
May 06 09:33:06 ws.cowbay.org netclient[17793]: Running command: iptables -A FORWARD -i nm-testvpn -j ACCEPT
May 06 09:33:06 ws.cowbay.org netclient[17793]: Running command: iptables -t nat -A POSTROUTING -o br-41b5539c1a80 -j MA
May 06 09:33:06 ws.cowbay.org netclient[17793]: Command checkin Executed Successfully
lines 4228-4256/4256 (END)
afeiszli commented 3 years ago

Strange, that should not be possible. Every time the "checkin" command is run, it sets a timestamp on the server side, and it's a unix timestamp so should not be timezone dependent. It turns yellow after ~5 minutes of no checkin and red after 30 minutes. In your screenshot you are on "all networks". If you click on "testvpn" is it the same? I also see you have set this node as a gateway. I may want to investigate if there is any logic that prevents the timestamp for gateways.

changchichung commented 3 years ago

If you click on "testvpn" is it the same

it's the same.

and I also remove gateway from this node.

0xdcarns commented 2 years ago

If issue is still persisting as of 0.9.2, please reopen

abhishekparihari commented 2 years ago

Hi, I am facing this issue with v0.14.5 image image

BLR-LAP-015 : windows system Netclient-AZ : Cloud VM in Azure testserver : VM in Hetzner

And I can see through Netclient-AZ peer that Only handshake is happening between Netmaker-1 and the peer. Whereas between other peers no handshake is happening. Below is the attached image. image

Please can anyone help on this.

varoudis commented 2 years ago

Im having the same issue. I get "Warning", now "ERROR" but links/peers seem all fine.