mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #2522] Refuses to work with unknown host in proxy_hosts #1759
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#1759
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Ganneff on GitHub (Jan 5, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2522
jc21/nginx-proxy-manager:latestdocker image?Describe the bug
When you defined a proxy host for some container and then stop the container, nginx proxy manager can not restart anymore. Or said container is not on auto-start for bootup, npm also cant start. Leaving access to your containers off.
Nginx Proxy Manager Version
2.9.19
5920b0cTo Reproduce
Steps to reproduce the behavior:
Setup npm
Define a bunch of other containers with web stuff
Setup proxy_hosts for them.
Now shutdown one of the web stuff containers, but not remove their proxy_host.
Restart npm, kaboom
Expected behavior
Detect it breaks, remove the proxy host config from container, possibly switch proxy_host to disabled. Neds parsing of nginx error.log, match for "host not found", the line contains the file that makes nginx refuses to work.
2023/01/05 12:15:28 [emerg] 7507#7507: host not found in upstream "HOSTNAME" in /data/nginx/proxy_host/5.conf:66
@watn3y commented on GitHub (Jan 7, 2023):
I can't seem to reproduce this issue.
Here's what i did:
docker stop librespeeddocker restart nginx-proxy-managerNPM started normally and the visiting the Proxy URL returned,as expected, HTTP 502 Bad Gateway.
As a sidenote, I'm using NPM with mariadb as a database so perhaps that makes a difference.
@Ganneff commented on GitHub (Jan 7, 2023):
Hi
I just retried, I can reproduce. 😄
Except, my initial description was sh*t, a bit, sorry. 😞
It's not just another container. I actually use portainer, and have stacks defined in them. npm is one stack, consisting of npm-app and npm-db (mariadb). Two networks, npm-internal and nginxproxy. npm-db has network only npm-internal, npm-app has nginxproxy and npm-internal.
Now any other stack with a web container has nginxproxy network too.
Shutdown other stack, wile npm running, and yes, I get a 502 bad gateway.
Restart the npm one with other stack still down, and it does not come back up, nginx doesn't know about the host. Which is correct - docker does no longer resolve the other host, as its stack is down.
Greetings
Ganneff
@Surgical71 commented on GitHub (Jan 10, 2023):
Hi.
Okay so to add more info. This issue is occurring after the latest update(V2.9.19)
In my case, I am unable to add a new proxy host and then also request and add a Lest Encrypt Certificate. Once you try and add a certificate it says (Internal Error) and marks the added proxy as "Unknown".
I also tried manually adding certificates and its the same issue.
I also checked the permissions of the folder where the permissions is stored and its again the same issue.
In some cases it can break NGINX Proxy manager completely as it then no longer allows you to view the login page due to certificate issues.
Screenshots attached:


@kabadisha commented on GitHub (Mar 19, 2023):
I had the same issue. I raised a PR with a fix: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/2672
If anyone on this thread can check out my PR and test it, that would be superb.
@github-actions[bot] commented on GitHub (Jan 31, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@github-actions[bot] commented on GitHub (Mar 17, 2025):
Issue was closed due to inactivity.