mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5771] [Bug]: Remote nodes stop forwarding traffic after editing any client (even without making changes) #4014
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#4014
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 @barbod1123-bit on GitHub (Jul 3, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5771
Describe the bug
I found a reliable way to reproduce this issue.
Whenever I edit any client on the master panel, even if I do not change any settings and simply open the client editor and click Save, all remote nodes stop forwarding traffic shortly afterward.
The master panel continues to work normally, but every remote node starts timing out.
The affected nodes still appear online in the panel, and Xray is shown as running, but all client connections through those nodes fail until I manually restart the Xray core on each affected remote node.
Restarting Xray on the remote node immediately restores connectivity, but the problem occurs again the next time any client is edited.
How to reproduce the problem
Set up a 3x-ui master panel with one or more remote nodes.
Ensure all nodes are working normally.
Open any existing client on the master panel.
Click Edit.
Without changing any values, click Save.
Wait a short time.
Observe that the master panel continues working, but all remote nodes stop forwarding traffic.
Restart the Xray core on any affected remote node.
Verify that traffic is restored until another client is edited.
Expected behavior
Editing a client without changing its configuration should not interrupt traffic on any remote node.
Actual behavior
After editing (or simply saving) any client, all remote nodes stop forwarding traffic while remaining online in the panel. Manual Xray restart on each remote node is required to restore service.
Relevant logs
Screenshots
No response
3x-ui version
3.4.2
Xray-core version
26.6.27
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 22.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 (Jul 3, 2026):
Confirmed in the source: editing a client on an inbound hosted on a remote node forces that node to tear down and rebuild that inbound's Xray handler roughly 5 seconds later — on every edit, including a no-op "open, click Save" — because the edit always stamps a fresh
updated_aton the client, which defeats the change-detection that would otherwise skip a redundant push. This is a different code path from the already-fixed auto-disable-forced-restart bug (#5740, fixed in4d6f2dd, not yet in any tagged release including 3.4.2).Confirmed chain:
ClientService.UpdateInboundClient(internal/web/service/client_inbound_apply.go:578-582) unconditionally setsnewMap["updated_at"] = time.Now().Unix() * 1000on the edited client, even when no field actually changed.client_inbound_apply.go:716-718) unconditionally marks the client's node dirty viaNodeService.MarkNodeDirtyTx, regardless of whether the immediate live per-client push to the node already succeeded.internal/web/web.go:293,cadenceNodeTraffic = "@every 5s"),NodeTrafficSyncJob.syncOnesees the node is dirty (internal/web/job/node_traffic_sync_job.go:366-368) and runsInboundService.ReconcileNode(internal/web/service/inbound_node.go:89-157), which re-pushes every inbound on that node throughRemote.ReconcileInbound(internal/web/runtime/remote.go:447-464). That function only skips a push when the inbound's wire fingerprint matches the last one it sent — but the just-bumpedupdated_atchanges the fingerprint every time, so it always pushes viaRemote.UpdateInbound→POST panel/api/inbounds/update/:idon the node.internal/web/controller/inbound.go:225-256) callsInboundService.UpdateInbound(internal/web/service/inbound.go:1036), and for the node's own local inbound (inbound.go:1197-1218) it unconditionally callsrt.DelInboundfollowed byrt.AddInboundthrough the local runtime (internal/web/runtime/local.go:75-81) — a raw xray-core gRPC handler removal + re-add for that inbound, with no check for whether the content actually changed.That remove-then-re-add sequence is the same class of operation already known in this codebase to be able to leave Xray "running" but not actually forwarding until a full process restart — see the VLESS-reverse-client fix (
internal/xray/hot_diff.go:123-125), which forces a full process restart instead of this same swap specifically because the swap can silently fail to fully rebind a handler. Whether it fails the same way for your inbound's protocol/transport is something I can't confirm from the source alone; that depends on xray-core's (v26.6.27) internal teardown/rebuild behavior for that specific configuration.To narrow this down further, could you provide:
This reply was generated automatically; a maintainer may follow up.
@barbod1123-bit commented on GitHub (Jul 3, 2026):
After further testing, I found a reliable way to reproduce the issue.
The problem is not random and does not require waiting 30–60 minutes.
Reproduction
Open any existing client on the master panel.
Click Edit.
Do not change anything.
Click Save.
Within a few seconds, all remote nodes stop forwarding traffic.
The master panel continues to work normally, but every remote node becomes unusable until I manually restart the Xray core on each node.
Additional observations
This happens every time.
It is 100% reproducible in my environment.
It affects all remote nodes simultaneously.
The nodes still appear Online in the panel.
Xray is still reported as Running.
Only a manual Restart Xray on the affected node restores traffic.
I also disabled Settings → General → "Restart Xray After Auto Disable", so this is not the previously reported issue (#5740).
Xray logs
The only messages that appear immediately after reproducing the issue are:
XRAY: transport/internet/splithttp: failed to serve HTTP for XHTTP > accept tcp [::]:8484: use of closed network connection
XRAY: transport/internet/splithttp: failed to serve HTTP for XHTTP > accept tcp [::]:2083: use of closed network connection
No panic, crash, or other error is logged.
Additional information
The issue is not limited to XHTTP.
My remote nodes also host TCP and gRPC inbounds, and they stop forwarding traffic as well.
Restarting the Xray process immediately restores all services until another client is edited and saved.
This seems to be related to the inbound reconcile/update path rather than a specific transport protocol, since editing any client (even without making any changes) consistently triggers the problem.
@mersadnouri commented on GitHub (Jul 4, 2026):
Hi.
my node doesn't push traffic to my main server even after restarting xray