NginxProxyManager / NginxProxyManager/nginx-proxy-manager

Unreachable upstream prevents server from starting

Open
#3,970 7 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
34.2k
Forks
3.9k
Avg merge
21h 12m
Merged PRs (30d)
20

Description

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes (I tried to skim through, but GitHub doesn't help when searching the error message returns a dozen pages of unrelated stuff)

Describe the bug

When an upstream is unreachable while NPM attempts to start, it will fail with nginx: [emerg] host not found in upstream.

But since NPM doesn't start, its web interface is not available to change/delete the entry. So I have no proper way to alleviate this, and I'm effectively in a deadlock.
I also went into database.sqlite and manually set enabled = 0, but that didn't help.

The only workaround I have found so far is to go into the proxy.conf mentioned in the error message and change every upstream definition to something that is reachable, start NPM, then change it back. Obviously that's rather far from intended usage.

Nginx Proxy Manager Version

Cannot reach the login page to check. But whatever is the latest version as of today.

To Reproduce
Steps to reproduce the behavior:

  1. Configure a proxy host pointing to another container
  2. Stop that other container
  3. Restart NPM

Expected behavior

NPM should start normally, with the offending proxy host being marked as "errored", disabled or similar.

Screenshots

image

Operating System

Unraid

Additional context

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure by stopping the configured upstream container and restarting the latest Docker image, then inspect the nginx error and generated proxy.conf. Review how the startup process handles entries stored in database.sqlite; done means Nginx Proxy Manager starts and the unreachable proxy host is marked errored or disabled without manual file edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, nginx, typescript
Domain
backend, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.