[GH-ISSUE #5771] [Bug]: Remote nodes stop forwarding traffic after editing any client (even without making changes) #4014

Closed
opened 2026-10-31 20:36:32 +07:00 by bsakaguchi · 3 comments
Owner

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

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
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 ```shell ``` ### 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 - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:36:32 +07:00
Author
Owner

@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_at on 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 in 4d6f2dd, not yet in any tagged release including 3.4.2).

Confirmed chain:

  • ClientService.UpdateInboundClient (internal/web/service/client_inbound_apply.go:578-582) unconditionally sets newMap["updated_at"] = time.Now().Unix() * 1000 on the edited client, even when no field actually changed.
  • The same function (client_inbound_apply.go:716-718) unconditionally marks the client's node dirty via NodeService.MarkNodeDirtyTx, regardless of whether the immediate live per-client push to the node already succeeded.
  • Every 5 seconds (internal/web/web.go:293, cadenceNodeTraffic = "@every 5s"), NodeTrafficSyncJob.syncOne sees the node is dirty (internal/web/job/node_traffic_sync_job.go:366-368) and runs InboundService.ReconcileNode (internal/web/service/inbound_node.go:89-157), which re-pushes every inbound on that node through Remote.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-bumped updated_at changes the fingerprint every time, so it always pushes via Remote.UpdateInbound → POST panel/api/inbounds/update/:id on the node.
  • On the node, that endpoint (internal/web/controller/inbound.go:225-256) calls InboundService.UpdateInbound (internal/web/service/inbound.go:1036), and for the node's own local inbound (inbound.go:1197-1218) it unconditionally calls rt.DelInbound followed by rt.AddInbound through 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:

  1. The protocol/transport of the inbound(s) on the affected node(s) (e.g. VLESS+Reality, VMess, Trojan, Shadowsocks, WireGuard, Hysteria2, gRPC/XHTTP), and whether any client on them uses a "reverse" (portal/bridge) tunnel.
  2. The node's own Xray log in the few seconds right after you click Save on an edit (not just once you notice traffic has already stopped) — panel → that node → Xray log viewer, or its captured stdout/stderr.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:4878395332 --> @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_at` on 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 in `4d6f2dd`, not yet in any tagged release including 3.4.2). Confirmed chain: - `ClientService.UpdateInboundClient` (`internal/web/service/client_inbound_apply.go:578-582`) unconditionally sets `newMap["updated_at"] = time.Now().Unix() * 1000` on the edited client, even when no field actually changed. - The same function (`client_inbound_apply.go:716-718`) unconditionally marks the client's node dirty via `NodeService.MarkNodeDirtyTx`, regardless of whether the immediate live per-client push to the node already succeeded. - Every 5 seconds (`internal/web/web.go:293`, `cadenceNodeTraffic = "@every 5s"`), `NodeTrafficSyncJob.syncOne` sees the node is dirty (`internal/web/job/node_traffic_sync_job.go:366-368`) and runs `InboundService.ReconcileNode` (`internal/web/service/inbound_node.go:89-157`), which re-pushes every inbound on that node through `Remote.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-bumped `updated_at` changes the fingerprint every time, so it always pushes via `Remote.UpdateInbound` → `POST panel/api/inbounds/update/:id` on the node. - On the node, that endpoint (`internal/web/controller/inbound.go:225-256`) calls `InboundService.UpdateInbound` (`internal/web/service/inbound.go:1036`), and for the node's own local inbound (`inbound.go:1197-1218`) it unconditionally calls `rt.DelInbound` followed by `rt.AddInbound` through 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: 1. The protocol/transport of the inbound(s) on the affected node(s) (e.g. VLESS+Reality, VMess, Trojan, Shadowsocks, WireGuard, Hysteria2, gRPC/XHTTP), and whether any client on them uses a "reverse" (portal/bridge) tunnel. 2. The node's own Xray log in the few seconds right after you click Save on an edit (not just once you notice traffic has already stopped) — panel → that node → Xray log viewer, or its captured stdout/stderr. *This reply was generated automatically; a maintainer may follow up.*
Author
Owner

@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

  1. Open any existing client on the master panel.

  2. Click Edit.

  3. Do not change anything.

  4. Click Save.

  5. 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.

<!-- gh-comment-id:4878915477 --> @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 1. Open any existing client on the master panel. 2. Click Edit. 3. Do not change anything. 4. Click Save. 5. 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.
Author
Owner

@mersadnouri commented on GitHub (Jul 4, 2026):

Hi.
my node doesn't push traffic to my main server even after restarting xray

<!-- gh-comment-id:4883378711 --> @mersadnouri commented on GitHub (Jul 4, 2026): Hi. my node doesn't push traffic to my main server even after restarting xray
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4014
No description provided.