[GH-ISSUE #1417] Upstream 容器不存在导致启动失败与 UI 无法访问 #2872

Closed
opened 2026-02-27 12:28:17 +03:00 by kerem · 0 comments
Owner

Originally created by @Time-w on GitHub (Oct 31, 2025).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1417

Describe the bug
当 Nginx UI 配置包含容器引用的 upstream时,如果对应容器不存在或无法启动,
Nginx UI 在重启时会报错并陷入死循环,无法进入 Web 管理界面。

To Reproduce
Steps to reproduce the behavior:

  1. 在 Nginx UI 中配置以下内容:
   upstream schedule-admin {
       ip_hash;
       server schedule_admin:8010;
   }
  1. 保存配置并应用。

  2. 停止或删除 schedule_admin 容器。

  3. 重启 Nginx UI。

  4. Nginx UI 启动失败,并持续报错:

    nginx: [emerg] host not found in upstream "schedule_admin:8010"
    
  5. Web UI 无法访问,陷入无法恢复的循环。

Expected behavior
即使某个 upstream 容器不存在,也希望:

  • Nginx UI 能正常启动;

  • 在 UI 中可以禁用或修改该站点配置;

  • 而不是整个系统陷入启动失败的死循环。

Screenshots
如果适用,请添加截图以帮助说明问题。

Info (please complete the following information):

  • Server OS: Ubuntu 22.04

  • Server Arch: x86_64

  • Nginx UI Version: v2.1.14 或 v2.1.17

  • Your Browser: Chrome 128

Additional context
建议:

  • 当 Nginx 启动失败时,Nginx UI 仍然能以“安全模式”启动;

  • 提供一个可视化入口禁用出错的站点;

  • 或者在检测到 upstream host 不存在时,自动跳过加载相关配置。

Originally created by @Time-w on GitHub (Oct 31, 2025). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1417 **Describe the bug** 当 Nginx UI 配置包含容器引用的 upstream时,如果对应容器不存在或无法启动, Nginx UI 在重启时会报错并陷入死循环,无法进入 Web 管理界面。 **To Reproduce** Steps to reproduce the behavior: 1. 在 Nginx UI 中配置以下内容: ```nginx upstream schedule-admin { ip_hash; server schedule_admin:8010; } ``` 2. 保存配置并应用。 3. 停止或删除 `schedule_admin` 容器。 4. 重启 Nginx UI。 5. Nginx UI 启动失败,并持续报错: ``` nginx: [emerg] host not found in upstream "schedule_admin:8010" ``` 6. Web UI 无法访问,陷入无法恢复的循环。 **Expected behavior** 即使某个 upstream 容器不存在,也希望: - Nginx UI 能正常启动; - 在 UI 中可以禁用或修改该站点配置; - 而不是整个系统陷入启动失败的死循环。 **Screenshots** 如果适用,请添加截图以帮助说明问题。 **Info (please complete the following information):** - Server OS: Ubuntu 22.04 - Server Arch: x86_64 - Nginx UI Version: v2.1.14 或 v2.1.17 - Your Browser: Chrome 128 **Additional context** 建议: - 当 Nginx 启动失败时,Nginx UI 仍然能以“安全模式”启动; - 提供一个可视化入口禁用出错的站点; - 或者在检测到 upstream host 不存在时,自动跳过加载相关配置。
kerem 2026-02-27 12:28:17 +03: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
starred/nginx-ui#2872
No description provided.