[GH-ISSUE #5294] [Bug]: after upgrading panel cannot not be started again #3708

Closed
opened 2026-10-31 20:34:23 +07:00 by bsakaguchi · 2 comments
Owner

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

Describe the bug

Panel state: Running
Start automatically: Yes
xray state: Running
mtproto inbound 3 (0.0.0.0:8443): Running

Choose an option: 1
Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: INFO - Tg notify enabled,run at 0 9 * * Sun
Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: WARNING - Add NewStatsNotifyJob: failed to schedule runtime "0 9 * * Sun": expected exactly 6 fields, found 5: [0 9 * * Sun]
Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: INFO - mtproto: started mtg for inbound 3 on 0.0.0.0:8443
Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json}
Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: WARNING - Failed to set bot commands: telego: setMyCommands: api: 429 "Too Many Requests: retry after 265", migrate to chat ID: 0, retry after: 265
Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: INFO - Telegram bot receiver started
Jun 13 19:27:12 proxycia x-ui[4161]: 2026/06/13 19:27:12 Error starting sub server: listen tcp :8443: bind: address already in use
Jun 13 19:27:12 proxycia systemd[1]: x-ui.service: Main process exited, code=exited, status=1/FAILURE
Jun 13 19:27:12 proxycia systemd[1]: x-ui.service: Failed with result 'exit-code'.
Jun 13 19:27:12 proxycia systemd[1]: x-ui.service: Consumed 420ms CPU time over 5.534s wall clock time, 111.8M memory peak.
Jun 13 19:27:17 proxycia systemd[1]: x-ui.service: Scheduled restart job, restart counter is at 4.
Jun 13 19:27:17 proxycia systemd[1]: Started x-ui.service - x-ui Service.
Jun 13 19:27:17 proxycia x-ui[4209]: 2026/06/13 19:27:17 Starting x-ui 3.3.0
Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: INFO - Web server running HTTPS on [::]:38969
Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: INFO - custom geo startup: no custom geofiles configured
Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: INFO - Tg notify enabled,run at 0 9 * * Sun
Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: WARNING - Add NewStatsNotifyJob: failed to schedule runtime "0 9 * * Sun": expected exactly 6 fields, found 5: [0 9 * * Sun]
Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json}
Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: INFO - mtproto: started mtg for inbound 3 on 0.0.0.0:8443
Jun 13 19:27:18 proxycia /usr/local/x-ui/x-ui[4209]: WARNING - Failed to set bot commands: telego: setMyCommands: api: 429 "Too Many Requests: retry after 259", migrate to chat ID: 0, retry after: 259
Jun 13 19:27:18 proxycia /usr/local/x-ui/x-ui[4209]: INFO - Telegram bot receiver started
Jun 13 19:27:18 proxycia x-ui[4209]: 2026/06/13 19:27:18 Error starting sub server: listen tcp :8443: bind: address already in use
Jun 13 19:27:18 proxycia systemd[1]: x-ui.service: Main process exited, code=exited, status=1/FAILURE
Jun 13 19:27:18 proxycia systemd[1]: x-ui.service: Failed with result 'exit-code'.
Jun 13 19:27:18 proxycia systemd[1]: x-ui.service: Consumed 365ms CPU time over 5.442s wall clock time, 93.7M memory peak.
Jun 13 19:27:23 proxycia systemd[1]: x-ui.service: Scheduled restart job, restart counter is at 5.
Jun 13 19:27:23 proxycia systemd[1]: Started x-ui.service - x-ui Service.
Jun 13 19:27:23 proxycia x-ui[4234]: 2026/06/13 19:27:23 Starting x-ui 3.3.0
Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - Web server running HTTPS on [::]:38969
Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - custom geo startup: no custom geofiles configured
Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - Tg notify enabled,run at 0 9 * * Sun
Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: WARNING - Add NewStatsNotifyJob: failed to schedule runtime "0 9 * * Sun": expected exactly 6 fields, found 5: [0 9 * * Sun]
Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json}
Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - mtproto: started mtg for inbound 3 on 0.0.0.0:8443
Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: WARNING - Failed to set bot commands: telego: setMyCommands: api: 429 "Too Many Requests: retry after 254", migrate to chat ID: 0, retry after: 254
Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - Telegram bot receiver started
Jun 13 19:27:23 proxycia x-ui[4234]: 2026/06/13 19:27:23 Error starting sub server: listen tcp :8443: bind: address already in use
Jun 13 19:27:23 proxycia systemd[1]: x-ui.service: Main process exited, code=exited, status=1/FAILURE
Jun 13 19:27:23 proxycia systemd[1]: x-ui.service: Failed with result 'exit-code'.
Jun 13 19:27:23 proxycia systemd[1]: x-ui.service: Consumed 414ms CPU time over 5.548s wall clock time, 101.4M memory peak.

How to reproduce the problem

  1. add mtproto inbound in webinterface
  2. update panel via webinterface
  3. ...

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.3.0

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 24

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 @AuthorProxy on GitHub (Jun 13, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5294 ### Describe the bug Panel state: Running Start automatically: Yes xray state: Running mtproto inbound 3 (0.0.0.0:8443): Running Choose an option: 1 Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: INFO - Tg notify enabled,run at 0 9 * * Sun Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: WARNING - Add NewStatsNotifyJob: failed to schedule runtime "0 9 * * Sun": expected exactly 6 fields, found 5: [0 9 * * Sun] Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: INFO - mtproto: started mtg for inbound 3 on 0.0.0.0:8443 Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json} Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: WARNING - Failed to set bot commands: telego: setMyCommands: api: 429 "Too Many Requests: retry after 265", migrate to chat ID: 0, retry after: 265 Jun 13 19:27:12 proxycia /usr/local/x-ui/x-ui[4161]: INFO - Telegram bot receiver started Jun 13 19:27:12 proxycia x-ui[4161]: 2026/06/13 19:27:12 Error starting sub server: listen tcp :8443: bind: address already in use Jun 13 19:27:12 proxycia systemd[1]: x-ui.service: Main process exited, code=exited, status=1/FAILURE Jun 13 19:27:12 proxycia systemd[1]: x-ui.service: Failed with result 'exit-code'. Jun 13 19:27:12 proxycia systemd[1]: x-ui.service: Consumed 420ms CPU time over 5.534s wall clock time, 111.8M memory peak. Jun 13 19:27:17 proxycia systemd[1]: x-ui.service: Scheduled restart job, restart counter is at 4. Jun 13 19:27:17 proxycia systemd[1]: Started x-ui.service - x-ui Service. Jun 13 19:27:17 proxycia x-ui[4209]: 2026/06/13 19:27:17 Starting x-ui 3.3.0 Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: INFO - Web server running HTTPS on [::]:38969 Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: INFO - custom geo startup: no custom geofiles configured Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: INFO - Tg notify enabled,run at 0 9 * * Sun Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: WARNING - Add NewStatsNotifyJob: failed to schedule runtime "0 9 * * Sun": expected exactly 6 fields, found 5: [0 9 * * Sun] Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json} Jun 13 19:27:17 proxycia /usr/local/x-ui/x-ui[4209]: INFO - mtproto: started mtg for inbound 3 on 0.0.0.0:8443 Jun 13 19:27:18 proxycia /usr/local/x-ui/x-ui[4209]: WARNING - Failed to set bot commands: telego: setMyCommands: api: 429 "Too Many Requests: retry after 259", migrate to chat ID: 0, retry after: 259 Jun 13 19:27:18 proxycia /usr/local/x-ui/x-ui[4209]: INFO - Telegram bot receiver started Jun 13 19:27:18 proxycia x-ui[4209]: 2026/06/13 19:27:18 Error starting sub server: listen tcp :8443: bind: address already in use Jun 13 19:27:18 proxycia systemd[1]: x-ui.service: Main process exited, code=exited, status=1/FAILURE Jun 13 19:27:18 proxycia systemd[1]: x-ui.service: Failed with result 'exit-code'. Jun 13 19:27:18 proxycia systemd[1]: x-ui.service: Consumed 365ms CPU time over 5.442s wall clock time, 93.7M memory peak. Jun 13 19:27:23 proxycia systemd[1]: x-ui.service: Scheduled restart job, restart counter is at 5. Jun 13 19:27:23 proxycia systemd[1]: Started x-ui.service - x-ui Service. Jun 13 19:27:23 proxycia x-ui[4234]: 2026/06/13 19:27:23 Starting x-ui 3.3.0 Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - Web server running HTTPS on [::]:38969 Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - custom geo startup: no custom geofiles configured Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - Tg notify enabled,run at 0 9 * * Sun Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: WARNING - Add NewStatsNotifyJob: failed to schedule runtime "0 9 * * Sun": expected exactly 6 fields, found 5: [0 9 * * Sun] Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json} Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - mtproto: started mtg for inbound 3 on 0.0.0.0:8443 Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: WARNING - Failed to set bot commands: telego: setMyCommands: api: 429 "Too Many Requests: retry after 254", migrate to chat ID: 0, retry after: 254 Jun 13 19:27:23 proxycia /usr/local/x-ui/x-ui[4234]: INFO - Telegram bot receiver started Jun 13 19:27:23 proxycia x-ui[4234]: 2026/06/13 19:27:23 Error starting sub server: listen tcp :8443: bind: address already in use Jun 13 19:27:23 proxycia systemd[1]: x-ui.service: Main process exited, code=exited, status=1/FAILURE Jun 13 19:27:23 proxycia systemd[1]: x-ui.service: Failed with result 'exit-code'. Jun 13 19:27:23 proxycia systemd[1]: x-ui.service: Consumed 414ms CPU time over 5.548s wall clock time, 101.4M memory peak. ### How to reproduce the problem 1. add mtproto inbound in webinterface 2. update panel via webinterface 3. ... ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.3.0 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu 24 ### 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:34:23 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

The crash is caused by a port conflict between the subscription server and your MTProto inbound. Both are attempting to bind 0.0.0.0:8443.

From the log sequence:

INFO  - mtproto: started mtg for inbound 3 on 0.0.0.0:8443
Error starting sub server: listen tcp :8443: bind: address already in use

The subscription server reads its listen port from the subPort key in the database (internal/web/service/setting.go, default 2096). In your installation that value has been changed to 8443, which matches your MTProto inbound's port. The settings validation (internal/web/entity/entity.go:168) only rejects a sub port equal to the panel web port; it does not check against Xray inbound ports, so saving this combination is allowed but fatal at startup.

Because the panel cannot start, you must fix this directly in the SQLite database.

Fix — change the subscription server port

sqlite3 /etc/x-ui/x-ui.db \
  "UPDATE settings SET value='2096' WHERE key='subPort';"
systemctl restart x-ui

Replace 2096 with any port that is not already in use by the panel web server or any inbound. Once the panel is running, confirm the change under Panel Settings → Subscription.

Alternative — disable the subscription server temporarily

If you do not use subscription links and want to confirm the cause first:

sqlite3 /etc/x-ui/x-ui.db \
  "UPDATE settings SET value='false' WHERE key='subEnable';"
systemctl restart x-ui

Secondary warning (non-fatal)

The log also shows:

WARNING - Add NewStatsNotifyJob: failed to schedule runtime "0 9 * * Sun": expected exactly 6 fields, found 5

This is a separate pre-existing issue with the Telegram stats-notify cron expression (5 fields supplied, scheduler requires 6 including seconds). It does not cause the crash and the panel starts normally despite it.


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

<!-- gh-comment-id:4699570807 --> @github-actions[bot] commented on GitHub (Jun 13, 2026): The crash is caused by a port conflict between the subscription server and your MTProto inbound. Both are attempting to bind `0.0.0.0:8443`. From the log sequence: ``` INFO - mtproto: started mtg for inbound 3 on 0.0.0.0:8443 Error starting sub server: listen tcp :8443: bind: address already in use ``` The subscription server reads its listen port from the `subPort` key in the database (`internal/web/service/setting.go`, default `2096`). In your installation that value has been changed to `8443`, which matches your MTProto inbound's port. The settings validation (`internal/web/entity/entity.go:168`) only rejects a sub port equal to the panel web port; it does not check against Xray inbound ports, so saving this combination is allowed but fatal at startup. Because the panel cannot start, you must fix this directly in the SQLite database. **Fix — change the subscription server port** ```bash sqlite3 /etc/x-ui/x-ui.db \ "UPDATE settings SET value='2096' WHERE key='subPort';" systemctl restart x-ui ``` Replace `2096` with any port that is not already in use by the panel web server or any inbound. Once the panel is running, confirm the change under Panel Settings → Subscription. **Alternative — disable the subscription server temporarily** If you do not use subscription links and want to confirm the cause first: ```bash sqlite3 /etc/x-ui/x-ui.db \ "UPDATE settings SET value='false' WHERE key='subEnable';" systemctl restart x-ui ``` --- **Secondary warning (non-fatal)** The log also shows: ``` WARNING - Add NewStatsNotifyJob: failed to schedule runtime "0 9 * * Sun": expected exactly 6 fields, found 5 ``` This is a separate pre-existing issue with the Telegram stats-notify cron expression (5 fields supplied, scheduler requires 6 including seconds). It does not cause the crash and the panel starts normally despite it. --- *This reply was generated automatically; a maintainer may follow up.*
Author
Owner

@AuthorProxy commented on GitHub (Jun 14, 2026):

@MHSanaei yes but you can add some protection on pressing save button - because it crashes everything, but with huge delay, upon next update. this make problem detection a little harder. both of those ports were binded through the web interface. And I forced to update db directly, moreover restoring to the previous version did not help as well. So user should have some experience to fix the problem quickly

<!-- gh-comment-id:4701697570 --> @AuthorProxy commented on GitHub (Jun 14, 2026): @MHSanaei yes but you can add some protection on pressing save button - because it crashes everything, but with huge delay, upon next update. this make problem detection a little harder. both of those ports were binded through the web interface. And I forced to update db directly, moreover restoring to the previous version did not help as well. So user should have some experience to fix the problem quickly
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#3708
No description provided.