[GH-ISSUE #3328] first login with 502 bad gateway,what should I do #2240

Open
opened 2026-02-26 07:34:40 +03:00 by kerem · 16 comments
Owner

Originally created by @HaSaKiYasuooo on GitHub (Nov 16, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3328

this is my docker-compose.yml file
version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
environment:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "(PASSWORD)"
DB_MYSQL_NAME: "npm"
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
db:
image: 'jc21/mariadb-aria:latest'
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: '(PASSWORD)'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: '(PASSWORD)'
volumes:
#- ./data/mysql:/var/lib/mysql
- ./mysql:/var/lib/mysql

when I login with admin@example.com and changeme,I revieve the 502 bad gateway,how can i resolve it?

Originally created by @HaSaKiYasuooo on GitHub (Nov 16, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3328 this is my docker-compose.yml file version: '3' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: - '80:80' - '81:81' - '443:443' environment: DB_MYSQL_HOST: "db" DB_MYSQL_PORT: 3306 DB_MYSQL_USER: "npm" DB_MYSQL_PASSWORD: "(PASSWORD)" DB_MYSQL_NAME: "npm" volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt db: image: 'jc21/mariadb-aria:latest' restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: '(PASSWORD)' MYSQL_DATABASE: 'npm' MYSQL_USER: 'npm' MYSQL_PASSWORD: '(PASSWORD)' volumes: #- ./data/mysql:/var/lib/mysql - ./mysql:/var/lib/mysql ------------------------------ when I login with admin@example.com and changeme,I revieve the 502 bad gateway,how can i resolve it?
Author
Owner

@pvnkrockjesvs commented on GitHub (Nov 19, 2023):

Same with my install I use for months. Tried a fresh install, same problem as op

<!-- gh-comment-id:1817802826 --> @pvnkrockjesvs commented on GitHub (Nov 19, 2023): Same with my install I use for months. Tried a fresh install, same problem as op
Author
Owner

@HaSaKiYasuooo commented on GitHub (Nov 20, 2023):

ar/run/docker.sock:发布“http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create?name=npm”:拨打unix /var/run/docker.sock:连接:权限否认。
请参阅“docker run --help”。
arch@archlinux ~/nginx2 [126]> sudo docker run -d \ (base)
--name=npm
-p 6080:80
-p 81:81
-p 6443:443
-v /home/npm/data:/data
-v /home/npm/letsencrypt:/etc/letsencrypt
--restart=always
jc21/nginx-proxy-manager:latest
81端口的入口需要用本地127.0.0.1:81才能进入,这个配置在服务器以后还需要做个ssh端口转发才能进入设置...

<!-- gh-comment-id:1818188104 --> @HaSaKiYasuooo commented on GitHub (Nov 20, 2023): ar/run/docker.sock:发布“http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create?name=npm”:拨打unix /var/run/docker.sock:连接:权限否认。 请参阅“docker run --help”。 arch@archlinux ~/nginx2 [126]> sudo docker run -d \ (base) --name=npm -p 6080:80 -p 81:81 -p 6443:443 -v /home/npm/data:/data -v /home/npm/letsencrypt:/etc/letsencrypt --restart=always jc21/nginx-proxy-manager:latest 81端口的入口需要用本地127.0.0.1:81才能进入,这个配置在服务器以后还需要做个ssh端口转发才能进入设置...
Author
Owner

@lastsamurai26 commented on GitHub (Nov 21, 2023):

how you are opening the Side ?
http://ip:81 or https://ip:81 ?

i cant reproduce the issue

<!-- gh-comment-id:1820719668 --> @lastsamurai26 commented on GitHub (Nov 21, 2023): how you are opening the Side ? http://ip:81 or https://ip:81 ? i cant reproduce the issue
Author
Owner

@HaSaKiYasuooo commented on GitHub (Nov 21, 2023):

how you are opening the Side ? http://ip:81 or https://ip:81 ?

i cant reproduce the issue

Use the local address 127.0.0.1:81. If you are booting on a remote vps, then you need to map the remote port 81 to the local machine. Use ssh port forwarding commands

<!-- gh-comment-id:1821063158 --> @HaSaKiYasuooo commented on GitHub (Nov 21, 2023): > how you are opening the Side ? http://ip:81 or https://ip:81 ? > > i cant reproduce the issue Use the local address 127.0.0.1:81. If you are booting on a remote vps, then you need to map the remote port 81 to the local machine. Use ssh port forwarding commands
Author
Owner

@lastsamurai26 commented on GitHub (Nov 22, 2023):

I am using this on a Cloud VPS, my compose looks like this:

version: '3.8'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    hostname: proxymanager
    healthcheck:
      test: ["CMD", "/bin/check-health"]
      interval: 10s
      timeout: 3s
    ports:
      # These ports are in format <host-port>:<container-port>
      - '80:80' # Public HTTP Port
      - '443:443' # Public HTTPS Port
#      - '81:81' # Admin Web Port
      - '8000:8000'
      - '8001:8001'

    # Uncomment the next line if you uncomment anything in the section
    environment:
      # Uncomment this if you want to change the location of
      # the SQLite DB file within the container
      # DB_SQLITE_FILE: "/data/database.sqlite"

      # Uncomment this if IPv6 is not enabled on your host
      DISABLE_IPV6: 'false'
    networks:
        proxy:
          ipv4_address: 172.18.1.253
    volumes:
      - /opt/containers/nginxproxy/data:/data
      - /opt/containers/nginxproxy/letsencrypt:/etc/letsencrypt
      - /opt/containers/nginxproxy/templates/_hsts.conf:/app/templates/_hsts.conf:ro
      - /etc/timezone:/etc/timezone:ro
      - /usr/share/zoneinfo:/usr/share/zoneinfo:ro
networks:
  proxy:
    external: true

after creating a domain for port 81, I deactivate port 81 again so that the NPM dashboard can only be reached via the domain.

maybe the error is somewhere there
http://IPVPS:81

<!-- gh-comment-id:1822673010 --> @lastsamurai26 commented on GitHub (Nov 22, 2023): I am using this on a Cloud VPS, my compose looks like this: ``` version: '3.8' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped hostname: proxymanager healthcheck: test: ["CMD", "/bin/check-health"] interval: 10s timeout: 3s ports: # These ports are in format <host-port>:<container-port> - '80:80' # Public HTTP Port - '443:443' # Public HTTPS Port # - '81:81' # Admin Web Port - '8000:8000' - '8001:8001' # Uncomment the next line if you uncomment anything in the section environment: # Uncomment this if you want to change the location of # the SQLite DB file within the container # DB_SQLITE_FILE: "/data/database.sqlite" # Uncomment this if IPv6 is not enabled on your host DISABLE_IPV6: 'false' networks: proxy: ipv4_address: 172.18.1.253 volumes: - /opt/containers/nginxproxy/data:/data - /opt/containers/nginxproxy/letsencrypt:/etc/letsencrypt - /opt/containers/nginxproxy/templates/_hsts.conf:/app/templates/_hsts.conf:ro - /etc/timezone:/etc/timezone:ro - /usr/share/zoneinfo:/usr/share/zoneinfo:ro networks: proxy: external: true ``` after creating a domain for port 81, I deactivate port 81 again so that the NPM dashboard can only be reached via the domain. maybe the error is somewhere there http://IPVPS:81
Author
Owner

@rsebi commented on GitHub (Nov 27, 2023):

Just performed an upgrade from 2.9.1 to latest image and cant login to admin panel anymore.
Screenshot 2023-11-27 130140

<!-- gh-comment-id:1828605397 --> @rsebi commented on GitHub (Nov 27, 2023): Just performed an upgrade from 2.9.1 to latest image and cant login to admin panel anymore. <img width="549" alt="Screenshot 2023-11-27 130140" src="https://github.com/NginxProxyManager/nginx-proxy-manager/assets/102179977/41c5f42d-31ff-4382-940f-7f77e122495c">
Author
Owner

@rsebi commented on GitHub (Nov 28, 2023):

After bit of research , i found another post with possible fix:
https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3237

Managed to apply the fix as outlined and it worked.

<!-- gh-comment-id:1828891752 --> @rsebi commented on GitHub (Nov 28, 2023): After bit of research , i found another post with possible fix: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3237 Managed to apply the fix as outlined and it worked.
Author
Owner

@github-actions[bot] commented on GitHub (May 28, 2024):

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

<!-- gh-comment-id:2134222680 --> @github-actions[bot] commented on GitHub (May 28, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@Akmalwy commented on GitHub (Aug 29, 2024):

i have the same problem

and this is the log from my nginx-proxy-manager :

❯ Starting backend ...
node: symbol lookup error: node: undefined symbol: , version GLIBC_2.2.5
❯ Starting backend ...
node: symbol lookup error: node: undefined symbol: , version GLIBC_2.2.5
❯ Starting backend ...
node: symbol lookup error: node: undefined symbol: , version GLIBC_2.2.5
❯ Starting backend ...
node: symbol lookup error: node: undefined symbol: , version GLIBC_2.2.5

<!-- gh-comment-id:2316733056 --> @Akmalwy commented on GitHub (Aug 29, 2024): i have the same problem and this is the log from my nginx-proxy-manager : ❯ Starting backend ... node: symbol lookup error: node: undefined symbol: , version GLIBC_2.2.5 ❯ Starting backend ... node: symbol lookup error: node: undefined symbol: , version GLIBC_2.2.5 ❯ Starting backend ... node: symbol lookup error: node: undefined symbol: , version GLIBC_2.2.5 ❯ Starting backend ... node: symbol lookup error: node: undefined symbol: , version GLIBC_2.2.5
Author
Owner

@zsio commented on GitHub (Sep 2, 2024):

i have the same problem

<!-- gh-comment-id:2324118637 --> @zsio commented on GitHub (Sep 2, 2024): i have the same problem
Author
Owner

@MarkRotNF commented on GitHub (Sep 8, 2024):

I also had the gateway error.

docker ps showed that " nginxproxymanager-db-1" (jc21/mariadb-aria:latest) ist "restarting" (in loop).

docker-compose up (without -d) returned:

app-1  | ❯ Starting backend ...
app-1  | ❯ Starting nginx ...
db-1   | 2024-09-08 10:59:54 0 [Note] Starting MariaDB 10.11.5-MariaDB source revision 7875294b6b74b53dd3aaa723e6cc103d2bb47b2c as process 1
db-1   | Cannot find checkpoint record at LSN (1,0x361f80)
db-1   | 2024-09-08 10:59:54 0 [ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables (*.MAI) and delete all aria_log.######## files
db-1   | 2024-09-08 10:59:54 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
db-1   | 2024-09-08 10:59:54 0 [Note] Plugin 'InnoDB' is disabled.
db-1   | 2024-09-08 10:59:54 0 [Note] Plugin 'FEEDBACK' is disabled.
db-1   | 2024-09-08 10:59:54 0 [ERROR] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some plugins may be not loaded
db-1   | 2024-09-08 10:59:54 0 [ERROR] Failed to initialize plugins.

I was able to fix it with the following:
cd to the mysql folder (should be the path thats in the docker-compose.yaml "db:" -> "volumes:". E.g. "./mysql" as in my case.
image

docker-compose down
sudo mv aria_log. XXXXXXXXX bak.aria_log.XXXXXXXXX
docker-compose up -d
(similar to described here: https://serverfault.com/questions/893626/mysql-wont-start-mysqld-got-signal-11)

(I'm not sure if this was due to insufficient free storage space. Mine was almost full.)

<!-- gh-comment-id:2336676010 --> @MarkRotNF commented on GitHub (Sep 8, 2024): I also had the gateway error. ``` docker ps``` showed that " nginxproxymanager-db-1" (jc21/mariadb-aria:latest) ist "restarting" (in loop). ``` docker-compose up``` (without -d) returned: ``` app-1 | ❯ Starting backend ... app-1 | ❯ Starting nginx ... db-1 | 2024-09-08 10:59:54 0 [Note] Starting MariaDB 10.11.5-MariaDB source revision 7875294b6b74b53dd3aaa723e6cc103d2bb47b2c as process 1 db-1 | Cannot find checkpoint record at LSN (1,0x361f80) db-1 | 2024-09-08 10:59:54 0 [ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables (*.MAI) and delete all aria_log.######## files db-1 | 2024-09-08 10:59:54 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed. db-1 | 2024-09-08 10:59:54 0 [Note] Plugin 'InnoDB' is disabled. db-1 | 2024-09-08 10:59:54 0 [Note] Plugin 'FEEDBACK' is disabled. db-1 | 2024-09-08 10:59:54 0 [ERROR] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some plugins may be not loaded db-1 | 2024-09-08 10:59:54 0 [ERROR] Failed to initialize plugins. ``` I was able to fix it with the following: cd to the mysql folder (should be the path thats in the docker-compose.yaml "db:" -> "volumes:". E.g. "./mysql" as in my case. ![image](https://github.com/user-attachments/assets/38c24d7f-91fd-4baa-87db-65bd6002340d) ``` docker-compose down``` ``` sudo mv aria_log. XXXXXXXXX bak.aria_log.XXXXXXXXX``` ``` docker-compose up -d``` (similar to described here: [https://serverfault.com/questions/893626/mysql-wont-start-mysqld-got-signal-11](https://serverfault.com/questions/893626/mysql-wont-start-mysqld-got-signal-1)) (I'm not sure if this was due to insufficient free storage space. Mine was almost full.)
Author
Owner

@pureexe commented on GitHub (Dec 23, 2024):

I have the same problem. Turn out it conflicts with the UFW firewall on my machine. So, disable UFW make it working correctly.

<!-- gh-comment-id:2559140196 --> @pureexe commented on GitHub (Dec 23, 2024): I have the same problem. Turn out it conflicts with the UFW firewall on my machine. So, disable UFW make it working correctly.
Author
Owner

@merrime-n commented on GitHub (Apr 28, 2025):

After a couple of minutes, the issue was automatically resolved for me.

<!-- gh-comment-id:2834004445 --> @merrime-n commented on GitHub (Apr 28, 2025): After a couple of minutes, the issue was automatically resolved for me.
Author
Owner

@alectric-tr commented on GitHub (Jun 27, 2025):

Same issue here as well. Same outcome as @okaeiz, the issue resolved itself after a few minutes.

<!-- gh-comment-id:3010888779 --> @alectric-tr commented on GitHub (Jun 27, 2025): Same issue here as well. Same outcome as @okaeiz, the issue resolved itself after a few minutes.
Author
Owner

@Prathyush-KKK commented on GitHub (Jul 16, 2025):

yup leave the container running, it gets resolved on its own

<!-- gh-comment-id:3080339971 --> @Prathyush-KKK commented on GitHub (Jul 16, 2025): yup leave the container running, it gets resolved on its own
Author
Owner

@github-actions[bot] commented on GitHub (Jan 22, 2026):

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

<!-- gh-comment-id:3782127529 --> @github-actions[bot] commented on GitHub (Jan 22, 2026): Issue is now considered stale. If you want to keep it open, please comment :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2240
No description provided.