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

Error: Can't login to NPM-Dashboard "Bad Gateway" - v2.11.0 (latest)

Open Gh0stExp10it opened this issue 2 years ago • 55 comments

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

Describe the bug

After I've upgraded to the latest version v2.11.0, the login to the NPM-Dashboard no longer works (npm-ip:81). As a side note, the upgrade was performed automatically on my server because I always use the "latest" version of the Docker image.

The log shows that no further entries follow the block below:

-------------------------------------
 _   _ ____  __  __
| \ | |  _ \|  \/  |
|  \| | |_) | |\/| |
| |\  |  __/| |  | |
|_| \_|_|   |_|  |_|
-------------------------------------
User:  npm PUID:0 ID:0 GROUP:0
Group: npm PGID:0 ID:0
-------------------------------------

❯ Starting nginx ...
❯ Starting backend ...
[1/19/2024] [12:07:04 PM] [Global   ] › ℹ  info      Using MySQL configuration
[1/19/2024] [12:07:05 PM] [Migrate  ] › ℹ  info      Current database version: 20211108145214

When rolling back to the previous version v2.10.4, the problem could be "fixed", a login in the dashboard was possible again.

Nginx Proxy Manager Version v2.11.0 (latest, as of date 19.01.2024)

To Reproduce Steps to reproduce the behavior:

  1. Go to npm-ip:81
  2. Insert credentials
  3. Click on "Sign in"
  4. Error message "Bad Gateway" appears

Expected behavior

Login should be possible, as it was in the previous version.

Screenshots

NPM-Dashboard-Bad-Gateway

Operating System

Ubuntu Server 22.04.3 LTS

Additional context

/None/

Gh0stExp10it avatar Jan 19 '24 12:01 Gh0stExp10it

After finish the writing of this issue I saw the similiar issue (unfortunately did not realize it before) - for reference/duplication: #3473

Gh0stExp10it avatar Jan 19 '24 12:01 Gh0stExp10it

I don't get the "Bad Gateway" message - simply nothing happens when I click "Sign in" after the update to the new Docker image. Portainer claims the container to be "Unhealthy" with last output: parse error: Invalid numeric literal at line 1, column 7 NOT OK The logs look fine. Docker host runs on Ubuntu 22.04 Downgrading NPM to v2.10.4 solved the problem for now

erikreimann avatar Jan 19 '24 16:01 erikreimann

I get also the "Bad Gateway" message and additionally the Docker health status says: parse error: Invalid numeric literal at line 1, column 7 NOT OK

Also, I had this in the log after first start with the new container: ❯ Configuring npm user ... useradd warning: npm's uid 0 outside of the UID_MIN 1000 and UID_MAX 60000 range.

Second start seems to be ok, but still unhealthy and the "Bad gateway" error. ❯ Configuring npm user ... 0 usermod: no changes

TheUntouchable avatar Jan 19 '24 16:01 TheUntouchable

I don't get the "Bad Gateway" message - simply nothing happens when I click "Sign in" after the update to the new Docker image. Portainer claims the container to be "Unhealty" with last output: parse error: Invalid numeric literal at line 1, column 7 NOT OK

If you want to verify it in another way, you could try sending a request via the API. Just change the IP and credentials in the body. e.g. Get new Token - via cURL (or also via Postman):

curl -X POST --location 'yourIPv4:81/api/tokens' \
--header 'Content-Type: application/json' \
--data-raw '{
    "identity": "[email protected]",
    "secret": "yourPassword"
}'

The response should then be something like this:

<html>
<head>
    <title>502 Bad Gateway</title>
</head>
<body>
    <center>
        <h1>502 Bad Gateway</h1>
    </center>
    <hr>
    <center>openresty</center>
</body>
</html>

Gh0stExp10it avatar Jan 19 '24 16:01 Gh0stExp10it

same problem as op for me on 2 different installation

spupuz avatar Jan 19 '24 17:01 spupuz

I have the same problem.

LittleNewton avatar Jan 19 '24 18:01 LittleNewton

I have the same problem.

wforumw avatar Jan 19 '24 19:01 wforumw

I have this problem as well. If you downgrade to the last version it works again with your normal login/configurations still working. Just change the image line in your docker compose from image: 'jc21/nginx-proxy-manager:latest' to image: 'jc21/nginx-proxy-manager:2.10.4' and re-deploy. Hopefully it's possible to find a real fix to this issue so we can update nginx proxy manager.

LucifersCircle avatar Jan 19 '24 19:01 LucifersCircle

Same problem. Beside that database version shows none, but not sure if this was always the case with sqlite. [1/19/2024] [9:26:27 PM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite [1/19/2024] [9:26:28 PM] [Migrate ] › ℹ info Current database version: none

Xeroxxx avatar Jan 19 '24 20:01 Xeroxxx

Same problem. Beside that database version shows none. [1/19/2024] [9:26:27 PM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite [1/19/2024] [9:26:28 PM] [Migrate ] › ℹ info Current database version: none

"Current database version: none" is normal when using the internal Sqlite

erikreimann avatar Jan 19 '24 20:01 erikreimann

Hello! I have 2 instances using the github-develop image for both. I swapped to github-develop awhile back to fix some weird issue and I forgot to switch back to latest. Anyway, both containers were updated at the same time early this morning. My intranet container is working fine, login and all. My DMZ instance is getting the "Bad Gateway" error upon logging in but reverse proxy is still working fine. Both containers are virtually identical, except for being on two different VLANs.

I tried to roll back the DMZ container to 2.10.4 but I'm still having the same issue.

danielpmorris87 avatar Jan 19 '24 21:01 danielpmorris87

downgrading to :2.10.4 solved this issue for me to.

ignacio82 avatar Jan 19 '24 23:01 ignacio82

Same problem using several different builds from the unraid app store. If I access the terminal and delete the /data/sqllite.database I am able to log in, but of course all configuration is reset.

From fresh install: Change username password Create a simple single host fowarded to an internal IP address, and pulled a new SSL cert. Everything works fine. I can logout and login just fine. I can access the host properly internally and externally. If I restart the container I get the same error on the login screen "Bad Gateway" The host is still accessable even after this error. The error only occurs after restarting the container. I replicated with 2 separate servers. (Both Unraid) I replicated with a portainer compose file. I replicated with the Nginx Official build from the unraid store. I repleciated with the binhex build from the unraid store. I can not find any log errors. (But maybe dont know where to look)

nginx

-Nemsys

nemsys54 avatar Jan 20 '24 03:01 nemsys54

An update on my situation:

  1. I downgraded to 2.10.3 and removed the NODE_OPTIONS=--openssl-legacy-provider environment variable. The container came up fine and I was able to log in. I restarted the container multiple times and was able to log in after each restart.

  2. I upgraded to 2.10.4. As before, container came up good and was able to restart/login with no issues.

  3. I upgraded to 2.11.0 (this time using the latest tag) and saw the following in the console: Configuring npm user ... useradd warning: npm's uid 0 outside of the UID_MIN 1000 and UID_MAX 60000 range. It appears that TheUntouchable commented on this earlier. Now I am unable to log in.

  4. From here, I downgraded back to 2.10.4 and removed the NODE_OPTIONS=--openssl-legacy-provider environment variable again. BOOM. I'm able to log back in.

I still have no clue why my intranet NPM container on 2.11.0 is working fine, even after a restart.

danielpmorris87 avatar Jan 20 '24 05:01 danielpmorris87

I have the same issue since 2.11.0. Moving back to 2.10.4 solved the issue for me too.

gVes avatar Jan 20 '24 09:01 gVes

Confirmed bug since update to v2.11.0

cmdflow avatar Jan 20 '24 09:01 cmdflow

I have the same issue since 2.11.0.

marvingerstner avatar Jan 20 '24 13:01 marvingerstner

Same issue since 2.11.0 (with latest tag) Moving back to 2.10.4 solved the issue for me too.

johnWeak1192 avatar Jan 20 '24 14:01 johnWeak1192

Same issue with lasted on Ubuntu oracle cloud. in Portainer also - unhealthy .

masterwishx avatar Jan 20 '24 16:01 masterwishx

same here..

change in docker compose image: 'jc21/nginx-proxy-manager:2.10.4'

solve issue, but use old version (of course)

thank you

ale82x avatar Jan 20 '24 17:01 ale82x