[GH-ISSUE #5869] [Bug]: Main panel cannot add inbound on port 80 for a specific node: "UNIQUE constraint failed: inbounds.port", but node's own panel works fine #4075

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

Originally created by @crossgg on GitHub (Jul 9, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5869

Describe the bug

When I try to add an inbound (with port 80) for a managed node from the main 3x-ui dashboard (i.e., in the node management section, selecting a node and creating an inbound for it), the operation fails with the error:

Something went wrong (UNIQUE constraint failed: inbounds.port)

However, if I log in directly to that node's own independent 3x-ui panel and create the same inbound with port 80 (for itself), it succeeds without any error.

This indicates that the main panel's port conflict check is not taking the node identity into account, while the node's own panel correctly associates the inbound with its own node ID.

How to reproduce the problem

Prepare the environment: Set up a Main 3x-ui Panel (central management server) and at least one separate Managed Node Server (e.g., Node-B). Make sure Node-B is already added to the main panel's node list.

Create a conflict on the main panel: On the Main Panel, go to the "Inbounds" list and create an inbound that uses port 80 (this can be for the main server itself, or for another node, e.g., Node-A). Save it successfully. Now port 80 is globally occupied in the main panel's inbound records.

Attempt to add port 80 for a different node from the Main Panel: Still on the Main Panel, navigate to Nodes → select the Node-B (the managed node). Click "Add Inbound", set the port to 80, fill in any protocol (e.g., VLESS), and click save.

Observe the error on the Main Panel: The main panel immediately returns the error:

Something went wrong (UNIQUE constraint failed: inbounds.port)

Alternative attempt (success) on the Node's own panel: Now, directly access the Node-B's own independent 3x-ui panel (via its own IP/domain and panel port). Go to its "Inbounds" page, click "Add Inbound", set the port to 80 with the same protocol, and click save.

Observe success on the Node's panel: The inbound is created successfully without any error, even though port 80 is already used on the main panel or other nodes.

Expected behavior

The main panel should allow adding an inbound with port 80 for a specific managed node, provided that:

  • The target node does not already have an inbound using port 80 (or the same (listen, port) combination).
  • The port may be used by other nodes or by the main panel itself without causing a conflict.

In other words, the uniqueness check for ports should be scoped per node (e.g., using a composite unique constraint on (node_id, port) or (node_id, listen, port)), rather than a global check on the port column alone. This would make the main panel's behavior consistent with that of each node's own panel, where the node's identity is implicitly known and correctly applied.

Actual behavior

No response

Relevant logs

: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat>
Jul 09 14:23:04 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:04 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:04 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:09 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat>
Jul 09 14:23:09 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:09 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:09 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:14 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat>
Jul 09 14:23:14 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:14 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:14 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:19 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat>
Jul 09 14:23:19 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:19 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:19 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:24 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat>
Jul 09 14:23:24 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:24 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:24 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:29 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat>
Jul 09 14:23:29 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:29 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:29 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:34 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat>
Jul 09 14:23:34 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:34 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:34 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:39 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat>
Jul 09 14:23:39 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:39 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port
Jul 09 14:23:39 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port

Screenshots

Image

3x-ui version

3.4.2

Xray-core version

v26.6.27

How did you install 3x-ui?

install.sh script

Operating system

main panel:ubuntu 22.04 node panel:ubuntu 20.04

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

Chrome 149

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 @crossgg on GitHub (Jul 9, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5869 ### Describe the bug When I try to add an inbound (with port 80) for a managed node from the main 3x-ui dashboard (i.e., in the node management section, selecting a node and creating an inbound for it), the operation fails with the error: `Something went wrong (UNIQUE constraint failed: inbounds.port)` However, if I log in directly to that node's own independent 3x-ui panel and create the same inbound with port 80 (for itself), it succeeds without any error. This indicates that the main panel's port conflict check is not taking the node identity into account, while the node's own panel correctly associates the inbound with its own node ID. ### How to reproduce the problem Prepare the environment: Set up a Main 3x-ui Panel (central management server) and at least one separate Managed Node Server (e.g., Node-B). Make sure Node-B is already added to the main panel's node list. Create a conflict on the main panel: On the Main Panel, go to the "Inbounds" list and create an inbound that uses port 80 (this can be for the main server itself, or for another node, e.g., Node-A). Save it successfully. Now port 80 is globally occupied in the main panel's inbound records. Attempt to add port 80 for a different node from the Main Panel: Still on the Main Panel, navigate to Nodes → select the Node-B (the managed node). Click "Add Inbound", set the port to 80, fill in any protocol (e.g., VLESS), and click save. Observe the error on the Main Panel: The main panel immediately returns the error: Something went wrong (UNIQUE constraint failed: inbounds.port) Alternative attempt (success) on the Node's own panel: Now, directly access the Node-B's own independent 3x-ui panel (via its own IP/domain and panel port). Go to its "Inbounds" page, click "Add Inbound", set the port to 80 with the same protocol, and click save. Observe success on the Node's panel: The inbound is created successfully without any error, even though port 80 is already used on the main panel or other nodes. ### Expected behavior The main panel should allow adding an inbound with port 80 for a specific managed node, provided that: - The target node does not already have an inbound using port 80 (or the same (listen, port) combination). - The port may be used by other nodes or by the main panel itself without causing a conflict. In other words, the uniqueness check for ports should be scoped per node (e.g., using a composite unique constraint on `(node_id, port)` or `(node_id, listen, port)`), rather than a global check on the `port` column alone. This would make the main panel's behavior consistent with that of each node's own panel, where the node's identity is implicitly known and correctly applied. ### Actual behavior _No response_ ### Relevant logs ```shell : WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat> Jul 09 14:23:04 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:04 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:04 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:09 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat> Jul 09 14:23:09 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:09 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:09 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:14 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat> Jul 09 14:23:14 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:14 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:14 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:19 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat> Jul 09 14:23:19 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:19 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:19 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:24 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat> Jul 09 14:23:24 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:24 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:24 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:29 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat> Jul 09 14:23:29 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:29 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:29 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:34 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat> Jul 09 14:23:34 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:34 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:34 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:39 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - node traffic sync: reconcile for jp3-amd failed: reconcile inbound "inbound-49567": remote: request body failed validat> Jul 09 14:23:39 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:39 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port Jul 09 14:23:39 arm-jp-tk-2 /usr/local/x-ui/x-ui[2853505]: WARNING - setRemoteTraffic: create central inbound for tag "in-80-tcp" failed: UNIQUE constraint failed: inbounds.port ``` ### Screenshots <img width="1458" height="488" alt="Image" src="https://github.com/user-attachments/assets/110b191c-a14b-4c28-bdbb-07e2c0587309" /> ### 3x-ui version 3.4.2 ### Xray-core version v26.6.27 ### How did you install 3x-ui? install.sh script ### Operating system main panel:ubuntu 22.04 node panel:ubuntu 20.04 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) Chrome 149 ### 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:58 +07:00
  • closed this issue
  • added the
    bug
    label
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#4075
No description provided.