Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Incorrect online duration #584

Open
2 tasks done
seocgr opened this issue Nov 26, 2024 · 12 comments
Open
2 tasks done

[Bug]: Incorrect online duration #584

seocgr opened this issue Nov 26, 2024 · 12 comments
Labels
bug Something isn't working cannot reproduce

Comments

@seocgr
Copy link

seocgr commented Nov 26, 2024

🐛 Describe the Bug

Version 0.7.0, the client's online duration is incorrect. The client went offline several hours ago, but it shows as just offline. The client for the attached screenshot was offline 5 hours ago.

🔍 Steps to Reproduce

The client for the attached screenshot was offline 5 hours ago.

🌐 Browser

Firefox

🔧 Deployment Type

  • Docker
  • Standalone

✨ Expected Behavior

No response

📋 ZTNET Logs

No response

🖼 Screenshots

image

@seocgr seocgr added the bug Something isn't working label Nov 26, 2024
@sinamics
Copy link
Owner

Not able to reproduce this issue.
ztnet uses zerotier-cli listpeers for detecting if a node is offline/online
There is a cron task running every 5min in the background to update the lastseen value in db.

Could you please provide detailed steps to reproduce the issue?

@seocgr
Copy link
Author

seocgr commented Nov 27, 2024

Not able to reproduce this issue. ztnet uses zerotier-cli listpeers for detecting if a node is offline/online There is a cron task running every 5min in the background to update the lastseen value in db.

Could you please provide detailed steps to reproduce the issue?
1、客户端已经关机或者退出,但是后台会显示刚离线几分钟,一会还会重新显示刚离线。

  1. The client has been shut down or logged out, but the backend will display 'just offline' for a few minutes and will reappear later.
    2.有时客户端离线后台状态会变成“中继”
  2. Sometimes the client's offline background status may become "relay"
    总结下来就是这个状态跟实际情况不一致。In summary, this state is inconsistent with the actual situation.
    I am a Docker deployment, version 0.7.0

When replying, I tested a client and it has been 20 minutes since I logged out, but the backend status is still online.
image

@seocgr
Copy link
Author

seocgr commented Nov 27, 2024

Is it related to me installing zerotier in a non Docker environment?

@sinamics
Copy link
Owner

I think is just how zerotier works, you can check manually if a node is connected.
type docker exec -it zerotier zerotier-cli listpeers, if your node is present then ztnet will show relayed or direct based on the current node status.

When replying, I tested a client and it has been 20 minutes since I logged out, but the backend status is still online.

You need to leave the network/controller entirely for the node to go offline. It will still be in the listpeers.

@seocgr
Copy link
Author

seocgr commented Nov 27, 2024

我认为这就是 Zerotier 的工作原理,您可以手动检查节点是否已连接。 输入docker exec -it zerotier zerotier-cli listpeers,如果您的节点存在,则 ztnet 将根据当前节点状态显示中继或直接。

回复时,我测试了一个客户端,已经注销20分钟了,但后端状态仍然在线。

您需要完全离开网络/控制器才能让节点离线。它仍然会在列表中。

I previously reported that the client has been shut down for several hours, but it still shows that it was offline for just a few minutes
Is this caused by the fact that zerotier is deployed on the system while ztnet is deployed on Docker?

@seocgr
Copy link
Author

seocgr commented Nov 27, 2024

Zero tier is not deployed on Docker

@sinamics
Copy link
Owner

if you are not using docker, just type sudo zerotier-cli listpeers

@seocgr
Copy link
Author

seocgr commented Nov 27, 2024

zerotier-cli listpeers

I just manually stopped the client service, and when zerotier-cli listpeers display LEAF, ztnet backend displays relay. What is the reason for the inaccurate status of listpeers?

@seocgr
Copy link
Author

seocgr commented Nov 27, 2024

The status of a unified client joining the official website is normal

@seocgr
Copy link
Author

seocgr commented Nov 27, 2024

image
This is the status of the same client in the backend of the official website

@sinamics
Copy link
Owner

zerotier-cli listpeers

I just manually stopped the client service, and when zerotier-cli listpeers display LEAF, ztnet backend displays relay. What is the reason for the inaccurate status of listpeers?

Ztnet checks if the node has data in the path array to determine if the node is online/relayed. thats why you see relayed when status is leaf.

sudo zerotier-cli listpeers -j

the offical website does not show direct nor relayed, only lastseen.

@seocgr
Copy link
Author

seocgr commented Nov 27, 2024

Zerotier-CLI 列表对等体

我只是手动停止了客户端服务,当zerotier-cli listpeers显示LEAF时,ztnet后端显示relay。 listpeers状态不准确的原因是什么?

Ztnet 检查节点path数组中是否有数据,以确定该节点是否在线/中继。这就是为什么当状态为叶子时您会看到中继。

sudo zerotier-cli listpeers -j

官网不显示direct也不显示relayed,只显示lastseen。

I think it would be more appropriate to follow the status on the official website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cannot reproduce
Projects
None yet
Development

No branches or pull requests

2 participants