nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

login page shows "bad gateway" (No Current solution) !

Open OfficialMikeJ opened this issue 6 months ago • 7 comments

I have run into this before and can't seem to figure out how to fix the "bad gateway" message below the login page once I input the default login details. Since I can't login I'm going to shut down the vm and wait for a solution to this if anyone knows how to fix this ?.

I have tried:

  • Restarting both the db and the proxy container.
  • Restarting my vm.
  • Tried using FireFox after failed logins from Brave browser.
  • Refreshing or reloading the page via F5 doesn't do anything or fix the issue.
  • Recently just wiped my browser cache for Brave (This is not the issue).

Hope someone can help me out here been a while since I ran npm.

OfficialMikeJ avatar Jul 13 '25 12:07 OfficialMikeJ

I am having this same issue after update. I have reinstalled it multiple times, rebooted... etc. Below is the example of what I'm seeing.

Image

abine45 avatar Jul 13 '25 19:07 abine45

I am running NPM on a Rasp pi 4b running Debian 11. I too had the bad gateway issue, but it turned out to be a dns issue. When I ran docker exec -it [npm container name] cat /etc/resolv.conf it gave an invalid DNS from the Pi. for some reason when I listed the DNS in dhcpcd.conf with a coma between the two DNS I wanted use, it gave the bad gateway. When I reverted to 1 DNS it worked, after restarting docker. I later added to /etc/docker folder daemon.json with my desired two DNS servers and it continued to work.

{ "dns": ["x.x.x.x","x.x.x.x"] }

rladelman771 avatar Jul 14 '25 03:07 rladelman771

@rladelman771 I have no clue what you're editing the files for ?. This is a fresh install of NPM and I have had this issue in the past. I have never had to edit any .conf files or anything of that nature. I see these errors in the log files:

Image

Seen above is what I see in my CLI when I run: docker logs and I see all those errors that say "Access denied for user '[email protected]' (using password: YES)

I am using the default pass and default email since this is a fresh install of NPM.

OfficialMikeJ avatar Jul 14 '25 13:07 OfficialMikeJ

My solution is just to use version [2.12.3] until this gets fixed.

dinoz0rg avatar Jul 15 '25 16:07 dinoz0rg

My solution is just to use version [2.12.3] until this gets fixed.

I tried going back a few versions as well, but this instead worked for me after reading logs (initially I somehow missed the dns comment above this lol, but logs led me in the right direction), it may have been related to the cloudflare module specifically though:

anyway tl;dr quick fix for me was just adding dns servers into my docker-compose.yml:

    dns:
      - 8.8.8.8
      - 8.8.4.4

because it looked like there were things timing out in the logs, citing a good old 'Temporary failure in name resolution' :

[7/18/2025] [5:01:49 AM] [Global ] › ⬤ debug CMD: . /opt/certbot/bin/activate && pip install --no-cache-dir cloudflare==2.19.* acme==$(certbot --version | grep -Eo '0-9+') certbot-dns-cloudflare==$(certbot --version | grep -Eo '0-9+') && deactivate [7/18/2025] [5:01:58 AM] [Certbot ] › ✖ error WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd361180290>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd361181150>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd361181c90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd3611827d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd3611833d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/ ERROR: Could not find a version that satisfies the requirement cloudflare==2.19.* (from versions: none)

Looks like a python module wasn't installing due to dns name resolution failure..

I did not need the dns in the config previously and nothing else changed on the machine that I'm aware of, probably just an update?

alexdatsko avatar Jul 18 '25 05:07 alexdatsko

Mine was presenting this problem and really was the connection to the database that was not being accepted, so I repailed the Containers Docker directly with Mariadb. In my case solved

services: app: image: 'jc21/nginx-proxy-manager:latest' ports: - '80:80' - '81:81' - '443:443' environment: DB_MARIADB_HOST: "db" DB_MARIADB_PORT: 3306 DB_MARIADB_USER: "npm" DB_MARIADB_PASSWORD: "ZOO" DB_MARIADB_NAME: "npm" volumes: - './data:/data' - './letsencrypt:/etc/letsencrypt' db: image: 'mariadb' environment: MARIADB_ROOT_PASSWORD: 'ZOO' MARIADB_DATABASE: 'npm' MARIADB_USER: 'npm' MARIADB_PASSWORD: 'ZOO' volumes: - './mysql:/var/lib/mysql'

sevenbsb avatar Aug 12 '25 00:08 sevenbsb

solution IP_RANGES_FETCH_ENABLED=false env

badwinton avatar Oct 29 '25 23:10 badwinton