[GH-ISSUE #5630] [Bug]: Remote client IPs are not displayed in the IP Log panel in v3.4.1 #3927

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

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

Describe the bug

In version 3.4.1, the client IP addresses from the Remote Log are not displayed in the IP Log panel. Additionally, the panel incorrectly shows the number of connected IP addresses as 0, even when clients are connected

How to reproduce the problem

  • Edit client
  • Check displayed modal

Expected behavior

  • Client IP addresses should be listed correctly in the IP Log panel.
  • The connected IP count should reflect the actual number of connected clients.

Actual behavior

  • No client IP addresses are displayed.
  • The connected IP count remains 0.

Relevant logs


Screenshots

No response

3x-ui version

3.4.1

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

Debian 13

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 @mkalantar on GitHub (Jun 28, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5630 ### Describe the bug In version 3.4.1, the client IP addresses from the Remote Log are not displayed in the IP Log panel. Additionally, the panel incorrectly shows the number of connected IP addresses as 0, even when clients are connected ### How to reproduce the problem - Edit client - Check displayed modal ### Expected behavior - Client IP addresses should be listed correctly in the IP Log panel. - The connected IP count should reflect the actual number of connected clients. ### Actual behavior - No client IP addresses are displayed. - The connected IP count remains 0. ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.4.1 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system Debian 13 ### 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:35:56 +07:00
Author
Owner

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

In v3.x (including v3.4.1), the IP Log panel is not populated from the Xray access log. Client IPs are collected exclusively through Xray's internal gRPC online-stats API (GetUsersStats), polled every 10 seconds by the panel's background job (internal/web/job/check_client_ip_job.go). Enabling, disabling, or changing the access log has no effect on what appears in the IP Log panel.

How the IP Log works:

  • IPs are recorded only while a client is actively connected (or within 30 minutes of disconnecting — after that, the entry is evicted).
  • The background job writes results to the inbound_client_ips database table, which the panel reads when you open the IP Log modal.
  • statsUserOnline: true is automatically injected into the generated Xray policy config (even if absent from the stored template), so the Xray core should track per-email IPs automatically.

Conditions that can produce 0 IPs:

  1. XUI_ENABLE_FAIL2BAN=false is set in /etc/default/x-ui.
    When this env var is set to false, the job collects online user data from the API but exits before writing anything to the database (internal/web/job/check_client_ip_job.go, line 59). The default is true (enabled), so this only affects users who have explicitly disabled it. Check with:

    grep XUI_ENABLE_FAIL2BAN /etc/default/x-ui
    
  2. The Xray gRPC API is not reachable.
    If Xray is running but the API inbound on port 62789 (or your custom port) is inaccessible, collectFromOnlineAPI returns nothing. Verify Xray is running and the API port is listening:

    ss -tlnp | grep 62789
    
  3. The Xray process is not running or has crashed.
    If Xray is not running, the job skips the run immediately. Check status from the panel home page or:

    journalctl -u x-ui --no-pager -n 50
    
  4. The Xray core does not support the online-stats API.
    Very old Xray binaries (shipped before the GetUsersStats RPC was added) return Unimplemented, after which the panel stops trying until the next restart. This would be logged as xray core does not support the online-stats API. The bundled core in v3.4.1 does support it, but a custom binary set via XUI_BIN_FOLDER might not.

To diagnose, please provide:

  1. The Xray core version — visible in the panel header or via:

    x-ui
    

    (option 15 shows the Xray version, or check the panel's home page version badge)

  2. Xray status — is the Xray indicator green on the panel home page?

  3. The relevant portion of the panel log:

    journalctl -u x-ui --no-pager -n 100 | grep -E "LimitIP|online-stats|online API"
    
  4. Contents of /etc/default/x-ui (redact any sensitive values).

  5. Whether the issue is specific to a particular protocol/inbound type.


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

<!-- gh-comment-id:4825343059 --> @github-actions[bot] commented on GitHub (Jun 28, 2026): In v3.x (including v3.4.1), the IP Log panel is **not** populated from the Xray access log. Client IPs are collected exclusively through Xray's internal gRPC online-stats API (`GetUsersStats`), polled every 10 seconds by the panel's background job (`internal/web/job/check_client_ip_job.go`). Enabling, disabling, or changing the access log has no effect on what appears in the IP Log panel. **How the IP Log works:** - IPs are recorded only while a client is actively connected (or within 30 minutes of disconnecting — after that, the entry is evicted). - The background job writes results to the `inbound_client_ips` database table, which the panel reads when you open the IP Log modal. - `statsUserOnline: true` is automatically injected into the generated Xray policy config (even if absent from the stored template), so the Xray core should track per-email IPs automatically. **Conditions that can produce 0 IPs:** 1. **`XUI_ENABLE_FAIL2BAN=false` is set in `/etc/default/x-ui`.** When this env var is set to `false`, the job collects online user data from the API but exits before writing anything to the database (`internal/web/job/check_client_ip_job.go`, line 59). The default is `true` (enabled), so this only affects users who have explicitly disabled it. Check with: ```bash grep XUI_ENABLE_FAIL2BAN /etc/default/x-ui ``` 2. **The Xray gRPC API is not reachable.** If Xray is running but the API inbound on port 62789 (or your custom port) is inaccessible, `collectFromOnlineAPI` returns nothing. Verify Xray is running and the API port is listening: ```bash ss -tlnp | grep 62789 ``` 3. **The Xray process is not running or has crashed.** If Xray is not running, the job skips the run immediately. Check status from the panel home page or: ```bash journalctl -u x-ui --no-pager -n 50 ``` 4. **The Xray core does not support the online-stats API.** Very old Xray binaries (shipped before the `GetUsersStats` RPC was added) return `Unimplemented`, after which the panel stops trying until the next restart. This would be logged as `xray core does not support the online-stats API`. The bundled core in v3.4.1 does support it, but a custom binary set via `XUI_BIN_FOLDER` might not. **To diagnose, please provide:** 1. The Xray core version — visible in the panel header or via: ```bash x-ui ``` (option 15 shows the Xray version, or check the panel's home page version badge) 2. Xray status — is the Xray indicator green on the panel home page? 3. The relevant portion of the panel log: ```bash journalctl -u x-ui --no-pager -n 100 | grep -E "LimitIP|online-stats|online API" ``` 4. Contents of `/etc/default/x-ui` (redact any sensitive values). 5. Whether the issue is specific to a particular protocol/inbound type. --- *This reply was generated automatically; a maintainer may follow up.*
Author
Owner

@mkalantar commented on GitHub (Jun 28, 2026):

  1. x-ui version: 26.6.22
  2. Xray indicator is green
  3. no output
  4. this file doesn't exists
  5. no

for more clarification in version 3.3.1 with Xray version 26.6.1 it is working. also the file /etc/default/x-ui doesn't exists on that server and output of log LimitIP... is empty as this updated server.

<!-- gh-comment-id:4825444254 --> @mkalantar commented on GitHub (Jun 28, 2026): 1. x-ui version: 26.6.22 2. Xray indicator is green 3. no output 4. this file doesn't exists 5. no for more clarification in version 3.3.1 with Xray version 26.6.1 it is working. also the file /etc/default/x-ui doesn't exists on that server and output of log LimitIP... is empty as this updated server.
Author
Owner

@MHSanaei commented on GitHub (Jun 28, 2026):

It looks like you changed the rules. Use the reset button and don't open any issues without logs and useful information.

<!-- gh-comment-id:4825828981 --> @MHSanaei commented on GitHub (Jun 28, 2026): It looks like you changed the rules. Use the reset button and don't open any issues without logs and useful information.
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#3927
No description provided.