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

Upgrading from 2.10.4 to 2.11.0 causes 502 for API endpoints

Open wdhdev opened this issue 2 years ago • 33 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

When I run docker compose pull, then docker compose up -d on my NPM instance and then go to the login page and try to login, it responds with a 502 error. The login page loads and all proxy hosts seem to be online, it's just the API endpoints.

I viewed the logs using docker compose logs and it stops at:

[1/19/2024] [5:15:29 AM] [Global   ] › ℹ  info      Using Sqlite: /data/database.sqlite
[1/19/2024] [5:15:29 AM] [Migrate  ] › ℹ  info      Current database version: none

I tried booting up a brand new instance of 2.11.0 and it works fine.

Nginx Proxy Manager Version

Upgrading from 2.10.4 to 2.11.0

To Reproduce Steps to reproduce the behavior:

  1. Have an existing NPM instance on 2.10.4 with some proxy hosts
  2. Attempt to upgrade it to 2.11.0
  3. See 502 Bad Gateway error on login screen

Expected behavior

I expected to be able to login and for the app to load properly.

Screenshots

image image

Operating System

Ubuntu 22 LTS 64-bit

Additional context

wdhdev avatar Jan 19 '24 05:01 wdhdev

i have the same issue. Can't access to Web Proxmox -> Debian 12 (LXC) -> docker 24.0.7

DieMetRik avatar Jan 19 '24 05:01 DieMetRik

I forgot to add, I'm using a Proxmox VM as well.

wdhdev avatar Jan 19 '24 05:01 wdhdev

Same here, but not on Proxmox. I'm on Ubuntu Server using the recommended docker-compose.yml in the docs.

jacobstein123 avatar Jan 19 '24 06:01 jacobstein123

Same for me after upgrading on portainer/docker using the recommended yaml with minimal settings.

fixi87 avatar Jan 19 '24 06:01 fixi87

hi,

i have the Same Problem. Update to 2.11.0 an can Not login. I think we Need a Version 2.11.1 😂

skipperkm avatar Jan 19 '24 06:01 skipperkm

Same here

pr0xyzer avatar Jan 19 '24 07:01 pr0xyzer

same here, downgrade to 2.10.4 fixes the problem

bazziebaz avatar Jan 19 '24 07:01 bazziebaz

thx, downgrade to 2.10.4 fixes the problem

przybylas avatar Jan 19 '24 07:01 przybylas

same here, downgrade to 2.10.4 fixes the problem

That's what I've done for now, but I would like to see a solution or fix for this still.

wdhdev avatar Jan 19 '24 07:01 wdhdev

[1/19/2024] [5:15:29 AM] [Global   ] › ℹ  info      Using Sqlite: /data/database.sqlite
[1/19/2024] [5:15:29 AM] [Migrate  ] › ℹ  info      Current database version: none

When this appears and you wait around 3-4 min it will show the error why it cannot proceed. I would advise to wait. This is how I managed to see the error and to fix a few months back after an update.

jpdsc avatar Jan 19 '24 08:01 jpdsc

Rolled back. Running in LXC container using https://tteck.github.io/Proxmox/ . Upgrading to 2.11.0 produces "bad gateway". Only solution thus far: roll back to recent snapshot or backup prior to upgrade.

lumper5 avatar Jan 19 '24 08:01 lumper5

Using mariadb the migration of the database hangs.

JBlond avatar Jan 19 '24 08:01 JBlond

Hello, same issue here on proxmox/docker some issue with the backend engine apparently

` # node[448]: std::unique_ptr node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start() at ../src/node_platform.cc:68

Assertion failed: (0) == (uv_thread_create(t.get(), start_thread, this))

----- Native stack trace ----- 1: 0xca5430 node::Abort() [node] 2: 0xca54b0 node::errors::SetPrepareStackTraceCallback(v8::FunctionCallbackInfov8::Value const&) [node] 3: 0xd24789 node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [node] 4: 0xd248ac node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node] 5: 0xc5e5a3 [node] 6: 0xc5ef34 node::Start(int, char**) [node] 7: 0x7f7dcf6691ca [/lib/x86_64-linux-gnu/libc.so.6] 8: 0x7f7dcf669285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6] 9: 0xbb8d7e _start [node] ./run: line 21: 448 Aborted (core dumped) s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;node --abort_on_uncaught_exception --max_old_space_size=250 index.js" ❯ Starting backend ...

node[452]: std::unique_ptr node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start() at ../src/node_platform.cc:68

Assertion failed: (0) == (uv_thread_create(t.get(), start_thread, this))

----- Native stack trace ----- 1: 0xca5430 node::Abort() [node] 2: 0xca54b0 node::errors::SetPrepareStackTraceCallback(v8::FunctionCallbackInfov8::Value const&) [node] 3: 0xd24789 node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [node] 4: 0xd248ac node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node] 5: 0xc5e5a3 [node] 6: 0xc5ef34 node::Start(int, char**) [node] 7: 0x7f98d8f1f1ca [/lib/x86_64-linux-gnu/libc.so.6] 8: 0x7f98d8f1f285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6] 9: 0xbb8d7e _start [node] ./run: line 21: 452 Aborted (core dumped) s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;node --abort_on_uncaught_exception --max_old_space_size=250 index.js" ❯ Starting backend ...

node[456]: std::unique_ptr node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start() at ../src/node_platform.cc:68

Assertion failed: (0) == (uv_thread_create(t.get(), start_thread, this))

----- Native stack trace ----- 1: 0xca5430 node::Abort() [node] 2: 0xca54b0 node::errors::SetPrepareStackTraceCallback(v8::FunctionCallbackInfov8::Value const&) [node] 3: 0xd24789 node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [node] 4: 0xd248ac node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node] 5: 0xc5e5a3 [node] 6: 0xc5ef34 node::Start(int, char**) [node] 7: 0x7f43ada6c1ca [/lib/x86_64-linux-gnu/libc.so.6] 8: 0x7f43ada6c285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6] 9: 0xbb8d7e _start [node] ./run: line 21: 456 Aborted (core dumped) s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;node --abort_on_uncaught_exception --max_old_space_size=250 index.js" ❯ Starting backend ...

node[460]: std::unique_ptr node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start() at ../src/node_platform.cc:68

Assertion failed: (0) == (uv_thread_create(t.get(), start_thread, this))

----- Native stack trace ----- 1: 0xca5430 node::Abort() [node] 2: 0xca54b0 node::errors::SetPrepareStackTraceCallback(v8::FunctionCallbackInfov8::Value const&) [node] 3: 0xd24789 node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [node] 4: 0xd248ac node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node] 5: 0xc5e5a3 [node] 6: 0xc5ef34 node::Start(int, char**) [node] 7: 0x7fcdc0cd21ca [/lib/x86_64-linux-gnu/libc.so.6] 8: 0x7fcdc0cd2285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6] 9: 0xbb8d7e _start [node] ./run: line 21: 460 Aborted (core dumped) s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;node --abort_on_uncaught_exception --max_old_space_size=250 index.js" ❯ Starting backend ...

node[464]: std::unique_ptr node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start() at ../src/node_platform.cc:68

Assertion failed: (0) == (uv_thread_create(t.get(), start_thread, this))

----- Native stack trace ----- 1: 0xca5430 node::Abort() [node] 2: 0xca54b0 node::errors::SetPrepareStackTraceCallback(v8::FunctionCallbackInfov8::Value const&) [node] 3: 0xd24789 node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [node] 4: 0xd248ac node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node] 5: 0xc5e5a3 [node] 6: 0xc5ef34 node::Start(int, char**) [node] 7: 0x7f2fd16471ca [/lib/x86_64-linux-gnu/libc.so.6] 8: 0x7f2fd1647285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6] 9: 0xbb8d7e _start [node] ./run: line 21: 464 Aborted (core dumped) s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;node --abort_on_uncaught_exception --max_old_space_size=250 index.js" ❯ Starting backend ...

node[468]: std::unique_ptr node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start() at ../src/node_platform.cc:68

Assertion failed: (0) == (uv_thread_create(t.get(), start_thread, this))

----- Native stack trace ----- 1: 0xca5430 node::Abort() [node] 2: 0xca54b0 node::errors::SetPrepareStackTraceCallback(v8::FunctionCallbackInfov8::Value const&) [node] 3: 0xd24789 node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [node] 4: 0xd248ac node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node] 5: 0xc5e5a3 [node] 6: 0xc5ef34 node::Start(int, char**) [node] 7: 0x7f0dbd0cb1ca [/lib/x86_64-linux-gnu/libc.so.6] 8: 0x7f0dbd0cb285 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6] 9: 0xbb8d7e _start [node] ./run: line 21: 468 Aborted (core dumped) s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;node --abort_on_uncaught_exception --max_old_space_size=250 index.js"`

eskiiom avatar Jan 19 '24 08:01 eskiiom

Same here, using external mariadb (latest version with auto upgrade on) hangs, it's been like this for 1 hour, so no errors, no progress on db migration

Screenshot_20240119-093034.png

version: "3.9"

secrets:
  mariadb_labo_pwd:
    file: /home/labo/docker/.secrets/mariadb_labo_pwd.txt

services:
  nginx_proxy_manager:
    container_name: NginxProxyManager
    image: jc21/nginx-proxy-manager:latest
    restart: unless-stopped
    networks:
      - bridge_labo
    ports:
      # Public HTTP Port:
      - 80:80
      # Public HTTPS Port:
      - 443:443
      - 443:443/udp
      # Admin Web Port:
      - 81:81
    environment:
      PUID: 1000
      PGID: 1000
      TZ: Europe/Rome
      # These are the settings to access your db
      DB_MYSQL_HOST: mariadb
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: redacted
      DB_MYSQL_PASSWORD__FILE: /run/secrets/mariadb_labo_pwd
      DB_MYSQL_NAME: npm
      DISABLE_IPV6: "true"
    volumes:
      - /home/labo/docker/npm/data:/data
      - /home/labo/docker/npm/letsencrypt:/etc/letsencrypt
    secrets:
      - mariadb_labo_pwd
    logging:
      options:
        max-size: 10m
        max-file: "5"
    healthcheck:
      test: ["CMD", "/bin/check-health"]
      interval: 10s
      timeout: 3s

networks:
  bridge_labo:
    external: true

labodj avatar Jan 19 '24 08:01 labodj

I have the same issue von VMware, Ubuntu 22.04

version: '3' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: - '80:80' - '81:81' - '443:443' volumes: - npm_data:/data - npm_letsencrypt:/etc/letsencrypt

volumes: npm_data: npm_letsencrypt:

th12289 avatar Jan 19 '24 09:01 th12289

thx, downgrade to 2.10.4 fixes the problem

Same problem here.. how do you downgrade tho ?

Thanks

using docker compose

battaglin avatar Jan 19 '24 11:01 battaglin

Same problem here.. how do you downgrade tho ?

In my case: i changed 'latest' to '2.10.4' in my docker compose file. Restarted the thing.

version: '3' services: app: image: 'jc21/nginx-proxy-manager:2.10.4' restart: unless-stopped ports: - 80:80 - 40000:81 - 443:443 volumes: - data:/data - letsencrypt:/etc/letsencrypt volumes: data: letsencrypt:

bazziebaz avatar Jan 19 '24 11:01 bazziebaz

same here: ttek Proxmox Script

tml89 avatar Jan 19 '24 12:01 tml89

version: '3.8'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

When logging in through NPM GUI, error 502 occurred. After checking fallback_error.log, http://127.0.0.1:3000 connection refused occurred. I eventually discovered that the backend server wasn't running, but there was nothing I could do. It was best to change the image version from latest to 2.10.4.

journiyoon avatar Jan 19 '24 13:01 journiyoon

Same problem here.. how do you downgrade tho ?

In my case, restore from snapshot I took in Proxmox before upgrading. I never upgrade - anything - w/o at least a snapshot or full backup. That saved me this time, as it has dozens of times previously.

lumper5 avatar Jan 19 '24 13:01 lumper5