nginx-proxy-manager: Cannot Log into Admin After Upgrade to 2.9.15

Updated via docker-compose to 2.9.15 from 2.9.14 and can no longer access the admin console. Login page loads but cannot log in.

Docker logs -

[1/17/2022] [7:56:36 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables
[1/17/2022] [7:56:39 AM] [Migrate  ] › ℹ  info      Current database version: none

I don’t see anything further than this. Normally can take ~ 30s-1min before other bits are logged but nothing further showing up with 2.9.15. Decided to roll back to 2.9.14 - pulled the 2.9.14 image and loaded - works fine!.

I’ve tried twice with 2.9.15 and no luck. Changes didn’t show any big ones so any pointers as to what could cause this?

Thanks

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 91 (13 by maintainers)

Most upvoted comments

@Jiriteach Indeed I downgraded to 2.9.14 and everything’s back to normal.

It appears that the certbot-dns-transip plugin is installing v0.3.3 and the No module named 'version' error seems to indicate that it’s only written for python 2, not 3 as we’ve been using. The latest version is 0.4.3, hopefully that works.

I’ve created #1773 to bump the version, but I am entirely unable to test it. Keep an eye on that PR for instructions to use the built docker image once it passes CI, and let me know how you go.

So the issue is setuptools, version 60 is causing problems whereas version 58 is fine with the certbot plugins you’re using. I’ll get a new version out soon

Still an issue with v2.11.0 and SQLite file.

[Global   ] › ℹ  info      Using Sqlite: /data/database.sqlite
[Migrate  ] › ℹ  info      Current database version: none

Downgrading to 2.10.0 did the trick for now.

error create table migrations (id int unsigned not null auto_increment primary key, name varchar(255), batch int, migration_time timestamp) - ER_CANT_CREATE_TABLE: Can’t create table npm.migrations (errno: 13 “Permission denied”)

That is what seems to coincide with “Bad gateway” when I try to log in

Still not working to this day… Getting a bad gateway message on the latest version still, the only thing that works is downgrading to 2.10.0 or lower, with all the possible vulnerabilities that are included…

docker exec -ti name_of_your_npm_container bash pip install cerbot_plugin_name --index-url https://www.piwheels.org/simple --prefer-binary

It worked for me… for cloudflare-dns the cmd is: pip install certbot-dns-cloudflare --index-url https://www.piwheels.org/simple --prefer-binary

Same problem here with 2.9.15 and 2.9.16 😨 Using Armbian (armv7l).

same here. Experiencing the same issue when using those 2 versions.

@Jiriteach While I haven’t been able to find a real fix for this. I have gotten myself up and running with all my original data running on 2.9.15. Here are the steps I took to get where I’m at now:

Did a mysqldump of all my data

  1. docker exec -it <mysql container> sh
  2. mysqldump -u root -p ... npm setting access_list access_list_auth access_list_client certificate proxy_host redirection_host stream > dump.sql
  3. Copied that dump.sql file to my local and off the docker image
  4. Created a new directory and copied the docker-compose.yml file over to that new directory
  5. docker-compose down the existing stuff, cd to the new directory and docker-compose up -d to spin it up
  6. Once it was up and running cmd+r on the :81/login route to make sure you’re not hitting a cached route and log in with the admin@example.com:changeme credentials
  7. Once logged in and my new admin user set up I copied over the letsencrypt and data directories from the existing set up to this new directory
  8. Logged into the new mysql instance and ran all the sql from the dump to restore my previous content in the UI

And that’s where I’m at now, things seem to be running. I’m able to log in and out fine, and all my existing content seems to be running fine now. But I haven’t tested everything, just hit a few urls and saw them working is all really.

For all the noobs like me who basically catched the wrong timing on trying portainer, docker-compose and nginx-proxy-manager — here a docker compose file that works.

Because the bad gateway issue can come up

  • due to the bug here in the latest version
  • and/or blocking the database port accidentally by not explicitly saying DB_MYSQL_HOST: 'db'
  • and/or for europeans like me who are used to " doublequotes instead of american ' quotes

😵‍💫

So this uses the previous version that works 2.9.14 and routes the port correctly within docker compose by connecting to the db-container.

version: "3"
services:
  app:
    image: 'jc21/nginx-proxy-manager:2.9.14'
    restart: unless-stopped
    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
      # Add any other Stream port you want to expose
      # - '21:21' # FTP
    environment:
      DB_MYSQL_HOST: 'db'
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: 'npm'
      DB_MYSQL_PASSWORD: 'npm'
      DB_MYSQL_NAME: 'npm'
      # Uncomment this if IPv6 is not enabled on your host
      # DISABLE_IPV6: 'true'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - db

  db:
    image: 'jc21/mariadb-aria:latest'
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
    volumes:
      - ./data/mysql:/var/lib/mysql

In Portainer: Go to Stack -> Add Stack -> Copy paste above and hit deploy.

Can confirm, update from 2.9.9 to 2.9.15 can’t login. Downgraded to 2.9.14 and could login again.