[GH-ISSUE #4763] [Bug]: Deleting NODES doesn't remove connections or clients or inbounds #3301

Closed
opened 2026-10-31 20:31:29 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Osairs on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4763

Describe the bug

After deleting the NODES all clients, connection and inbounds from other node still showing up in main node even so there are no connection between it anymore.

How to reproduce the problem

add node, make sure it sync and snowing all connections and clients from other node. go to NODE and delete connected node. (refresh, relog)

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.2.5

Xray-core version

26.6.1

How did you install 3x-ui?

Other (please describe in the bug body)

Operating system

Unbutu 24.4

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

Chome 148

Is the panel behind a reverse proxy or CDN?

No — direct access

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 @Osairs on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4763 ### Describe the bug After deleting the NODES all clients, connection and inbounds from other node still showing up in main node even so there are no connection between it anymore. ### How to reproduce the problem add node, make sure it sync and snowing all connections and clients from other node. go to NODE and delete connected node. (refresh, relog) ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.2.5 ### Xray-core version 26.6.1 ### How did you install 3x-ui? Other (please describe in the bug body) ### Operating system Unbutu 24.4 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) Chome 148 ### Is the panel behind a reverse proxy or CDN? No — direct access ### 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:31:29 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Jun 1, 2026):

Thanks for the detailed report!

This is a confirmed bug. When a node is deleted, the code in web/service/node.go (NodeService.Delete) only removes the node record from the database and drops its in-memory connection — it does not cascade-delete the inbounds and clients that were synced from that node (those rows have a node_id column pointing to the deleted node). As a result, those orphaned inbounds and clients remain visible on the main panel.

Workaround (until a fix is released):

Before deleting a node, you can manually remove its synced inbounds from the main panel's Inbounds page. Look for inbounds that display the node's name/tag in the node column and delete them first. This ensures their associated clients are also cleaned up before the node itself is removed.

Root cause (for developers):

The fix would require NodeService.Delete to also delete all inbounds (and their clients) where node_id = <deleted node id> — similar to how the inbound service already queries WHERE node_id IS NOT NULL in several places.

We'll leave this open for a maintainer to implement the cascade cleanup. If you'd like to contribute a fix, a PR is very welcome!

<!-- gh-comment-id:4592689966 --> @github-actions[bot] commented on GitHub (Jun 1, 2026): Thanks for the detailed report\! This is a confirmed bug. When a node is deleted, the code in `web/service/node.go` (`NodeService.Delete`) only removes the node record from the database and drops its in-memory connection — it does **not** cascade-delete the inbounds and clients that were synced from that node (those rows have a `node_id` column pointing to the deleted node). As a result, those orphaned inbounds and clients remain visible on the main panel. **Workaround (until a fix is released):** Before deleting a node, you can manually remove its synced inbounds from the main panel's Inbounds page. Look for inbounds that display the node's name/tag in the node column and delete them first. This ensures their associated clients are also cleaned up before the node itself is removed. **Root cause (for developers):** The fix would require `NodeService.Delete` to also delete all inbounds (and their clients) where `node_id = <deleted node id>` — similar to how the inbound service already queries `WHERE node_id IS NOT NULL` in several places. We'll leave this open for a maintainer to implement the cascade cleanup. If you'd like to contribute a fix, a PR is very welcome\!
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#3301
No description provided.