mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5022] [Bug]: Nodes traffic usage #3535
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3535
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Nima786 on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5022
Describe the bug
As I tested, the master panel doesn't count the Nodes usage, it even doesn't show as an online user if connected to any Node rather than the main panel.
How to reproduce the problem
Create a user that has assigned nodes, connect to any remote Node's config then monitor the traffic usage on the main panel (however it shows the usage correctly on the corresponded Node)
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.2.8
Xray-core version
26.6.1
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 6, 2026):
Thanks for the detailed report. The node-traffic sync mechanism works like this on the master:
GET /panel/api/server/statuswith the configured Bearer token and marks the node online or offline in the master DB.onlineANDEnable = true. For every such node it fetches/panel/api/inbounds/list+/panel/api/clients/onlinesByGuid(or the legacy/panel/api/clients/onlines) and merges traffic deltas into the master database. If the node is offline or the heartbeat failed,ClearNodeOnlineClientsis called and no traffic is counted.The most common causes of traffic/online-status not reaching the master:
1. Node shows as "offline" on the master
Open Nodes page on the master panel. If the node badge is red/offline, the sync never runs. Possible sub-causes:
verifywith a self-signed cert — useskiporpin).2. API token not configured or mismatched
Every request the master makes to a node uses
Authorization: Bearer <token>. If the token is missing, the sync immediately fails withnode has no API token configured(logged as a WARNING but never shown in the UI).3. Sync errors in the master logs
Run this on the master server to see any live sync warnings:
A line like
node traffic sync: fetch from <NodeName> failed: …pinpoints the exact failure.To confirm the exact problem, please share:
If the node shows as online and the logs are clean, the next step would be to check whether the client email is actually attached to a node-backed inbound (one with a node_id) rather than a local inbound on the master — only node-backed inbound traffic is synced via this path.
@ahmetakdag101 commented on GitHub (Jun 6, 2026):
I had the same issue on a multi-node setup.
In my case:
The main panel logs showed errors like:
WARNING - node traffic sync: merge for s521-node-01 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTATE 42804)
WARNING - node traffic sync: merge for s521-node-02 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTATE 42804)
WARNING - node traffic sync: merge for s521-node-03 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTATE 42804)
Temporary workaround:
I downgraded only the main/accounting panel from v3.2.8 to v3.2.7.
I did not downgrade the remote nodes. The nodes stayed on v3.2.8.
After downgrading the main panel to v3.2.7, the node traffic sync error disappeared and the main panel started receiving traffic/online status correctly again.
So for now, as a temporary workaround, downgrading only the main panel to v3.2.7 may be enough until this is fixed in a future release.
@usamirali commented on GitHub (Jun 6, 2026):
i had this problem too
on local its work
but on the node it doesnt work
@Nima786 commented on GitHub (Jun 7, 2026):
that is correct, when I checked the master panel server logs, showed the exact same errors as below:
Jun 07 03:30:55 nima.fun /usr/local/x-ui/x-ui[149303]: WARNING - node traffic sync: merge for USA - Oracle failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTATE 42804)
Jun 07 03:31:00 nima.fun /usr/local/x-ui/x-ui[149303]: WARNING - node traffic sync: merge for Germany - Oracle failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTATE 42804)
Jun 07 03:31:00 nima.fun /usr/local/x-ui/x-ui[149303]: WARNING - node traffic sync: merge for Turkey failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTATE 42804)
...
and the same things:
Main panel was running 3x-ui v3.2.8
Remote nodes were also visible and online
Clients could connect to the nodes successfully
Traffic and online status were visible on the node panels
But the main/accounting panel did not show the user as online and did not update the traffic usage.