mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6786] [Bug]: Repeated User Status Changes and setRemoteTraffic Loop in Multi-Node #4519
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#4519
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 @Begamegazon on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6786
Describe the bug
I am using the Sanaei X-UI panel with 8 nodes configured.
Some users are automatically disabled and re-enabled approximately every 6 seconds, without any manual intervention. This behavior repeats continuously and appears to be related to the remote node traffic synchronization or lifecycle management.
On the main server, the following log message is repeated every 6 seconds:
2026/10/10 14:49:21 INFO - X-UI: setRemoteTraffic: node 2 lifecycle lift; marking dirty for re-push
The issue affects some users, while others appear to work normally. Since I have 8 nodes configured, I am not sure whether the problem is related to node synchronization, remote traffic updates, or the lifecycle management mechanism.
How to reproduce the problem
Install and configure the Sanaei X-UI panel.
Configure 8 nodes.
Run the panel and allow it to synchronize traffic and user statuses across the nodes.
Monitor the main server logs.
Observe that the following message appears approximately every 6 seconds:
setRemoteTraffic: node 2 lifecycle lift; marking dirty for re-push
Observe that some users are automatically disabled and re-enabled at approximately the same interval, without any manual action.
Expected behavior
User statuses should remain stable unless explicitly changed by an administrator or affected by a legitimate configuration or traffic-limit rule. Remote traffic synchronization should not cause users to be repeatedly disabled and re-enabled.
Actual behavior
Some users repeatedly switch between disabled and enabled states approximately every 6 seconds, while the main server continuously logs the same setRemoteTraffic message.
Could this be caused by a node lifecycle synchronization loop, repeated traffic updates, or an issue with remote node state management?
Relevant logs
Screenshots
No response
3x-ui version
v3.9.0
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
ubuntu 20
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 (Oct 10, 2026):
This looks like a v3.9.0 regression that is already fixed on
mainbut not in a release yet. In v3.9.0 a node ignores the client list andenableflag that the master re-pushes whenever the node was enrolled with an ordinary admin API token, which is the default. The master then sees the same mismatch on every traffic sync, logslifecycle lift; marking dirty for re-push, pushes again, and the push is ignored again.How the loop runs (v3.9.0)
enable/expiryTimewith its own values. If anything changed, it marks the node dirty. Seeinternal/web/service/client_locks.go:276-278: andinternal/web/service/inbound_node.go:1443-1449, which logs the line you are seeing.UpdateInboundkeeps its stored clients andenableunless the request counts as a master push (internal/web/service/inbound.go:1856-1858):node-syncscope. Nodes enrolled with anadmintoken threw the master's values away, but the push still counted as successful. The next snapshot carried the oldenableagain, so steps 1–3 repeated on every sync tick (the ~6 s you see).What fixes it
Commit
2ffc694a("fix(nodes): let a master's push and reconcile converge node inbounds") makes the master send anX-3x-Master-Pushheader on every request, and the node now honours it (internal/web/controller/inbound.go:70). It is onmainand in thedev-latestpre-release, but not in v3.9.0. Both sides need the fix: the master sends the header and the node checks it, so update the master and all 8 nodes once it ships.Possible workaround until then (not verified): on each node, create an API token with scope
node-sync(Settings → Security → API tokens), then re-enroll that node on the master with this token. With that scope, v3.9.0 should already accept the master's pushes. If it works, the log line should stop after the next sync.If the log line still repeats after updating master and nodes (or after the workaround), please reply with:
admin,monitorornode-sync). This confirms whether this is the cause.enablevalue and expiry/total shown on the master, and on node 2, both as text. That would show which side changes it.Verdict: Already fixed
Severity: High
Confidence: Medium
Root cause:
InboundService.UpdateInbound(internal/web/service/inbound.go:1856) on the node keeps the stored clients/enableunlessFromNodeSyncis set. In v3.9.0 the controller set it only for thenode-synctoken scope, so master pushes from admin-token enrollments were ignored.liftClientLifecycleInSettings(client_locks.go:239) then sees the same mismatch every tick and marks the node dirty again. Introduced by823db059("fix(inbounds): keep the stored client list and enable on inbound save"), which is in v3.9.0.Already fixed:
2ffc694aonmain/dev-latest. Not in v3.9.0, so unreleased.Duplicate of: None
Evidence:
client_locks.go:276-278(lift overrides nodeenablewith the master row);inbound_node.go:1443-1450(marks dirty, logs the reported line);inbound.go:1856-1858(node keeps stored clients/enable when not a master push);2ffc694adiff tocontroller/inbound.go:70(svc.FromNodeSync = scope == model.ApiScopeNodeSync || c.GetHeader(wirecodec.MasterPushHeader) != "") andruntime/remote.go(req.Header.Set(wirecodec.MasterPushHeader, "1"));git tag --contains 823db059→ v3.9.0,git tag --contains 2ffc694a→ onlydev-latest.Not determined: That node 2 is enrolled with an
admin-scope token. That is the condition this cause needs, and the report does not say. Also not settled: whether the visible enable/disable flipping is the same loop or a second effect of it. The token scope in step 1 above would settle the first point.This reply was generated automatically; a maintainer may follow up.