NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
21.92k stars 2.53k forks source link

Cannot access admin interface on v2.11.1 (502 Gateway Error) #3585

Closed krosseyed closed 2 months ago

krosseyed commented 6 months ago

Checklist

Describe the bug I cannot log into the admin interface after deploying a fresh v2.11.1 container on a Mikrotik CHR on AWS using a t3.micro.

To Reproduce Steps to reproduce the behavior:

  1. Setup container support and enable device-mode on AWS for Mikrotik CHR
  2. Create config.json and move it to /npm on CHR
  3. Install container using the following config
/interface/veth
add name=veth1 address=172.17.0.2/24 gateway=172.17.0.1

/interface/bridge
add name=docker

/ip/address
add address=172.17.0.1/24 interface=docker

/interface/bridge/port 
add bridge=docker interface=veth1
/ip/firewall/nat/add chain=srcnat action=masquerade src-address=172.17.0.0/24 

/container envs
add key=DB_SQLITE_FILE name=npm_envs value=/data/database.sqlite
add key=DEBUG name=npm_envs value=true

/container mounts
add dst=/data name=/npm/data src=/npm/data
add dst=/etc/letsencrypt name=/npm/letsencrypt src=/npm/letsencrypt
add dst=/app/config/production.json name=/npm/config.json src=/npm/config.json

/container
add envlist=npm_envs interface=veth1 logging=yes mounts=/npm/data,/npm/letsencrypt,/npm/config.json root-dir=/npm/root start-on-boot=yes workdir=/app
  1. Remove /etc/nginx/conf.d/dev.conf by going into the container and deleting it
    /container shell 0
    rm /etc/nginx/conf.d/dev.conf
  2. Shutdown and Startup the container and wait about 10 minutes to start up. Then access via http://:81 using the default admin credentials

Expected behavior To be able to log into the admin console. Not get a 502/Bad Gateway error

Screenshots

Screenshot 2024-02-25 at 11 25 16 PM

Operating System Mikrotik CHR v7.12.1 using the container application provided by Mikrotik

Additional context

I am getting in my logs the following output: Using Sqlite: /data/database.sqlite

I know Mikrotik's RouterOS is not a popular platform, but it would be nice to have this configuration to run NPM documented somewhere so people who want to run this on RouterOS can do so. The newer hardware is definitely equivalent or faster than a RaspberryPi and has more networking capabilities than most computing platforms.

SaschMie commented 6 months ago

Same here, the new update broke npm. Login is broken and dns challenge errors all time.

bluekitedreamer commented 6 months ago

This is caused by various checks initiated during startup versus after the app has loaded. I'm filing a separate but related bug which sheds some light into the issue at hand.

krosseyed commented 2 months ago

There was another issue I discovered and it was related to how much RAM I allowed the VM to use. I am going to close this ticket for now as I am no longer trying to use NginxProxyManager for my homelab needs.

krosseyed commented 1 month ago

Just an update, ran this same setup on a brand new CRS2116 and it works fine. It was the RAM limit that got me on this bug.