NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
22.95k stars 2.66k forks source link

NPM Stops working properly if Streamed container is down. #2506

Open Frenzoid opened 1 year ago

Frenzoid commented 1 year ago

Checklist

image

Describe the bug When a Streamed container is stopped, the npm container enter a configuration loading loop, proxy hosts and everything else stops working.

Nginx Proxy Manager Version image

To Reproduce Steps to reproduce the behavior: 1) Create a new container that requires streaming ( for example, a Minecraft server ) 2) Create a new Stream on the NPM Panel. 3) Stop the streamed container without first disabling the Stream.

image

Expected behavior The NPM container keeps working normaly. Same as when a Proxy Host container is stopped.

Screenshots logs of the NPM container after I stop my MC container. image

Operating System image

Additional context image

Purrrpley commented 1 year ago

I think a way to fix this is to do what the proxy hosts do and use proxy_pass $server; instead of proxy_pass server;. So instead of:

proxy_pass <server>;

You'd have:

set $server = "<server>";
proxy_pass = $server;

... I'm not sure why Nginx works this way, but it does, and that fixes it (for me anyway). So I think changing how NPM auto-generates files to do that for stream hosts too would solve this issue.

You can workaround this though by manually modifying /data/nginx/streams/*.conf yourself, but that breaks if you make a change in the GUI and the file gets regenerated :/

edit: this seems to actually break the streaming part for some reason (even though the NPM control panel shows "online"), so this actually doesn't fix it (or at least the workaround doesn't), but doing this does prevent it from getting stuck in an error loop at startup...

github-actions[bot] commented 9 months ago

Issue is now considered stale. If you want to keep it open, please comment :+1: