mysteriumnetwork / node

Mysterium Network Node - official implementation of distributed VPN network (dVPN) protocol
https://mysterium.network
GNU General Public License v3.0
1.11k stars 311 forks source link

Node offline in node dashboard #4998

Closed virusbear closed 2 years ago

virusbear commented 2 years ago

Describe the bug I am experiencing similar issues on my node as described by @soffokl in issue #4049. My node shows up as offline in the node dashboard but was online in the NodeUI for the first 12-18h of operation. After that 12 - 18 h the NodeUI now shows "Test Failed" status. The only traffic received by the Node seems to be the connection tests scheduled every 6h, causing sessions of 0 seconds and 0 bytes of data.

Expected behavior Node shows online in both the Node dashboard as well as the NodeUI and gets traffic routed.

Screenshots image

image

Environment (please complete the following information):

Additional context The server is hosted in Germany with public IP and gigabit networking. The server was restarted multiple times as well as the service/docker container running mysterium-node. The first installation was bare metal, switched to docker to avoid any mismatching configurations Checking the proposals endpoint completes successfully and shows my node (only if I don't use whitelisted traffic though)

Docker run command: docker run --cap-add NET_ADMIN -d --restart always --net host --name myst -v /var/lib/mysterium-node:/var/lib/mysterium-node mysteriumnetwork/myst:latest service --agreed-terms-and-conditions

journalctl output: node.log docker logs: logs.txt

Update

I logged in from another network which is not my home network. Being able to open the NodeUI it now shows "All services offline": image

While loading the NodeUI it seems like the tequilapi does not authorize any connections image

etherunit commented 2 years ago

Note that your shared proposals endpoint has include_monitoring_failed=true meaning that it will show anyway. If you remove this part, node will disappear with null --> https://discovery.mysterium.network/api/v3/proposals?provider_id=0x65e31d79ca1efc641d0bf11405da619f2c030390

Connections from MA with xx.xx KB of data may indicate that node establish a tunnel but fails to transmit further packets with peer. It's a common issue with firewall (iptables) blocking it.

2022-04-13T09:25:24.057 WRN ../../../../source/requests/dialer_swarm.go:293      > Failed to lookup host: "quality.mysterium.network" error="lookup quality.mysterium.network: no such host"
2022-04-13T09:25:34.058 ERR ../../../../source/core/quality/mysterium_morqa.go:190 > Failed to sent batch metrics request, 21 error="Post \"https://quality.mysterium.network/api/v3/batch\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
2022-04-13T09:25:57.049 WRN ../../../../source/requests/dialer_swarm.go:293      > Failed to lookup host: "broker.mysterium.network" error="lookup broker.mysterium.network: no such host"
virusbear commented 2 years ago

I just recreated my docker container with the ---dns 8.8.8.8 option to hopefully prevent any lookup errors. my docker logs (logs2.txt) don't show any Failed to lookup host errors anymore.

Unfortunately I am not familiar with iptables. Running sudo iptables -t nat -nvL shows this output:

Chain PREROUTING (policy ACCEPT 165 packets, 7999 bytes)
 pkts bytes target     prot opt in     out     source               destination         
57947 2906K DOCKER     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT 165 packets, 7999 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 385 packets, 25885 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DOCKER     all  --  *      *       0.0.0.0/0           !127.0.0.0/8          ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT 385 packets, 25885 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MASQUERADE  all  --  *      !docker0  172.17.0.0/16        0.0.0.0/0           

Chain DOCKER (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 RETURN     all  --  docker0 *       0.0.0.0/0            0.0.0.0/0           

Chain MYST (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DNAT       all  --  *      *       0.0.0.0/0            10.0.0.0/8           to:240.0.0.1
    0     0 DNAT       all  --  *      *       0.0.0.0/0            172.16.0.0/12        to:240.0.0.1
    0     0 DNAT       all  --  *      *       0.0.0.0/0            192.168.0.0/16       to:240.0.0.1
    0     0 DNAT       all  --  *      *       0.0.0.0/0            127.0.0.0/8          to:240.0.0.1

Am I correct that this is the standard created by docker (before the docker installation no entries were shown)? I already disabled ufw on the node so no traffic is blocked by it.

Is there a possibility I can somehow get this node to work?

etherunit commented 2 years ago

Please try to update your node to 1.6.4. It could potentially hold a solution: fix eventbus deadlocks by @Snawoot in https://github.com/mysteriumnetwork/node/pull/5018 p.s. let us know if that helps, thanks!

virusbear commented 2 years ago

I upgraded everything about 2 days ago and it did not seem to fix anything. After fiddling around a little bit I got the node back up online again but the Nodes dashboard is still showing offline: image

virusbear commented 2 years ago

Since about 2 days my node is visible as online in the node dashboard now. Even though nothing was changed I will close this issue as everything is working now.