[GH-ISSUE #922] Login Bad Gate and SSL Internal Error #783

Closed
opened 2026-02-26 06:34:24 +03:00 by kerem · 6 comments
Owner

Originally created by @starsareintherose on GitHub (Mar 3, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/922

Are you in the right place?

  • If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit.
  • If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask.
  • If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the right place.

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
  • Right
  • Are you sure you're not using someone else's docker image?
  • Right
  • If having problems with Lets Encrypt, have you made absolutely sure your site is accessible from outside of your network?
  • Right

Describe the bug

  • A clear and concise description of what the bug is.
  • When I set the SSL, always report Internet Error, and after I remove and re-install it, I find when I enter the email and password, always report "bad gate"
  • What version of Nginx Proxy Manager is reported on the login page?
  • Latest of docker.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.
It can make me login and set SSL
Screenshots
If applicable, add screenshots to help explain your problem.

Operating System

  • Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error.
    Ubuntu 18
    Additional context
    Add any other context about the problem here, docker version, browser version if applicable to the problem. Too much info is better than too little.
    My docker-compose.yml
version: "2"
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: always
    ports:
      # Public HTTP Port:
      - '8080:80'
      # Public HTTPS Port:
      - '443:443'
      # Admin Web Port:
      - '81:81'
    environment:
      # These are the settings to access your db
      DB_MYSQL_HOST: "db"
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: "npm"
      DB_MYSQL_PASSWORD: "npm"
      DB_MYSQL_NAME: "npm"
      # If you would rather use Sqlite uncomment this
      # and remove all DB_MYSQL_* lines above
      # DB_SQLITE_FILE: "/data/database.sqlite"
      # 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: always
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
    volumes:
      - ./data/mysql:/var/lib/mysql

my config.json

{
  "database": {
    "engine": "mysql",
    "host": "db",
    "name": "npm",
    "user": "npm",
    "password": "npm",
    "port": 3306
  }
}

docker ps -a

CONTAINER ID   IMAGE                             COMMAND                  CREATED         STATUS                     PORTS                                                            NAMES
3b7550f5dfa0   jc21/nginx-proxy-manager:latest   "/init"                  9 minutes ago   Up 9 minutes (unhealthy)   0.0.0.0:81->81/tcp, 0.0.0.0:8080->80/tcp, 0.0.0.0:776->443/tcp   proxy_app_1
890fa1844a34   jc21/mariadb-aria:latest          "/scripts/run.sh"        9 minutes ago   Up 9 minutes               3306/tcp                                                         proxy_db_1
Originally created by @starsareintherose on GitHub (Mar 3, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/922 **Are you in the right place?** - If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit. - If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask. - If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.* **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Right - Are you sure you're not using someone else's docker image? - Right - If having problems with Lets Encrypt, have you made absolutely sure your site is accessible from outside of your network? - Right **Describe the bug** - A clear and concise description of what the bug is. - When I set the SSL, always report Internet Error, and after I remove and re-install it, I find when I enter the email and password, always report "bad gate" - What version of Nginx Proxy Manager is reported on the login page? - Latest of docker. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. It can make me login and set SSL **Screenshots** If applicable, add screenshots to help explain your problem. **Operating System** - Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error. Ubuntu 18 **Additional context** Add any other context about the problem here, docker version, browser version if applicable to the problem. Too much info is better than too little. My docker-compose.yml ``` version: "2" services: app: image: 'jc21/nginx-proxy-manager:latest' restart: always ports: # Public HTTP Port: - '8080:80' # Public HTTPS Port: - '443:443' # Admin Web Port: - '81:81' environment: # These are the settings to access your db DB_MYSQL_HOST: "db" DB_MYSQL_PORT: 3306 DB_MYSQL_USER: "npm" DB_MYSQL_PASSWORD: "npm" DB_MYSQL_NAME: "npm" # If you would rather use Sqlite uncomment this # and remove all DB_MYSQL_* lines above # DB_SQLITE_FILE: "/data/database.sqlite" # 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: always environment: MYSQL_ROOT_PASSWORD: 'npm' MYSQL_DATABASE: 'npm' MYSQL_USER: 'npm' MYSQL_PASSWORD: 'npm' volumes: - ./data/mysql:/var/lib/mysql ``` my config.json ``` { "database": { "engine": "mysql", "host": "db", "name": "npm", "user": "npm", "password": "npm", "port": 3306 } } ``` docker ps -a ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3b7550f5dfa0 jc21/nginx-proxy-manager:latest "/init" 9 minutes ago Up 9 minutes (unhealthy) 0.0.0.0:81->81/tcp, 0.0.0.0:8080->80/tcp, 0.0.0.0:776->443/tcp proxy_app_1 890fa1844a34 jc21/mariadb-aria:latest "/scripts/run.sh" 9 minutes ago Up 9 minutes 3306/tcp proxy_db_1 ```
kerem 2026-02-26 06:34:24 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@starsareintherose commented on GitHub (Mar 3, 2021):

I can login after restart and waite.
The SSL error is following

Error: Command failed: /usr/bin/certbot certonly --non-interactive --config "/etc/letsencrypt.ini" --cert-name "npm-16" --agree-tos --email "starsareintherose@outlook.com" --preferred-challenges "dns,http" --domains "malacology.net" 
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for malacology.net
Using the webroot path /data/letsencrypt-acme-challenge for all unmatched domains.
Waiting for verification...
Challenge failed for domain malacology.net
http-01 challenge for malacology.net
Cleaning up challenges
Some challenges have failed.

    at ChildProcess.exithandler (child_process.js:308:12)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1051:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
<!-- gh-comment-id:789561251 --> @starsareintherose commented on GitHub (Mar 3, 2021): I can login after restart and waite. The SSL error is following ``` Error: Command failed: /usr/bin/certbot certonly --non-interactive --config "/etc/letsencrypt.ini" --cert-name "npm-16" --agree-tos --email "starsareintherose@outlook.com" --preferred-challenges "dns,http" --domains "malacology.net" Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None Obtaining a new certificate Performing the following challenges: http-01 challenge for malacology.net Using the webroot path /data/letsencrypt-acme-challenge for all unmatched domains. Waiting for verification... Challenge failed for domain malacology.net http-01 challenge for malacology.net Cleaning up challenges Some challenges have failed. at ChildProcess.exithandler (child_process.js:308:12) at ChildProcess.emit (events.js:314:20) at maybeClose (internal/child_process.js:1051:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) ```
Author
Owner

@starsareintherose commented on GitHub (Mar 3, 2021):

letsencrypt.log
The log is here. Too long to copy here

<!-- gh-comment-id:789565431 --> @starsareintherose commented on GitHub (Mar 3, 2021): [letsencrypt.log](https://github.com/jc21/nginx-proxy-manager/files/6074824/letsencrypt.log) The log is here. Too long to copy here
Author
Owner

@LanceMcCarthy commented on GitHub (Mar 5, 2021):

I started having the issue too, and now the entire system is down because it's hung in a loop (Docker marked it as unhealthy and the port is unresponsive). I decided to (╯°□°)╯︵ ┻━┻ and start from scratch.

surprise, surprise, the brand new install is also having the issues, so maybe it is a systemic problem

Steps to reproduce

Raspberry Pi 4
Brand new docker-compose using

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      DISABLE_IPV6: 'true'
      X_FRAME_OPTIONS: "sameorigin"
    volumes:
      - ./config.json:/app/config/production.json
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

wait for login, use default credentials

Observe : Bad gateway in web UI
Observe: Continuous errors about uncaught promises in Docker logs

<!-- gh-comment-id:791042742 --> @LanceMcCarthy commented on GitHub (Mar 5, 2021): I started having the issue too, and now the entire system is down because it's hung in a loop (Docker marked it as unhealthy and the port is unresponsive). I decided to (╯°□°)╯︵ ┻━┻ and start from scratch. surprise, surprise, the brand new install is also having the issues, so maybe it is a systemic problem Steps to reproduce Raspberry Pi 4 Brand new docker-compose using ``` version: '3' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: - '80:80' - '81:81' - '443:443' environment: DISABLE_IPV6: 'true' X_FRAME_OPTIONS: "sameorigin" volumes: - ./config.json:/app/config/production.json - ./data:/data - ./letsencrypt:/etc/letsencrypt ``` wait for login, use default credentials Observe : Bad gateway in web UI Observe: Continuous errors about uncaught promises in Docker logs
Author
Owner

@starsareintherose commented on GitHub (Mar 5, 2021):

Also, firstly, I can't set 80:80, then 443:443 can't be used.

<!-- gh-comment-id:791064213 --> @starsareintherose commented on GitHub (Mar 5, 2021): Also, firstly, I can't set 80:80, then 443:443 can't be used.
Author
Owner

@starsareintherose commented on GitHub (Mar 5, 2021):

I started having the issue too, and now the entire system is down because it's hung in a loop (Docker marked it as unhealthy and the port is unresponsive). I decided to (╯°□°)╯︵ ┻━┻ and start from scratch.

surprise, surprise, the brand new install is also having the issues, so maybe it is a systemic problem

Steps to reproduce

Raspberry Pi 4
Brand new docker-compose using

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      DISABLE_IPV6: 'true'
      X_FRAME_OPTIONS: "sameorigin"
    volumes:
      - ./config.json:/app/config/production.json
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

wait for login, use default credentials

Observe : Bad gateway in web UI
Observe: Continuous errors about uncaught promises in Docker logs

When Bad Gate, restart and waited then will be okay.

<!-- gh-comment-id:791068269 --> @starsareintherose commented on GitHub (Mar 5, 2021): > I started having the issue too, and now the entire system is down because it's hung in a loop (Docker marked it as unhealthy and the port is unresponsive). I decided to (╯°□°)╯︵ ┻━┻ and start from scratch. > > surprise, surprise, the brand new install is also having the issues, so maybe it is a systemic problem > > Steps to reproduce > > Raspberry Pi 4 > Brand new docker-compose using > > ``` > version: '3' > services: > app: > image: 'jc21/nginx-proxy-manager:latest' > restart: unless-stopped > ports: > - '80:80' > - '81:81' > - '443:443' > environment: > DISABLE_IPV6: 'true' > X_FRAME_OPTIONS: "sameorigin" > volumes: > - ./config.json:/app/config/production.json > - ./data:/data > - ./letsencrypt:/etc/letsencrypt > ``` > > wait for login, use default credentials > > Observe : Bad gateway in web UI > Observe: Continuous errors about uncaught promises in Docker logs When Bad Gate, restart and waited then will be okay.
Author
Owner

@LanceMcCarthy commented on GitHub (Mar 5, 2021):

I even recreated the container from scratch, it didn't resolve the issue.

That led me to look at what is inside the persisted volume's data and letsencrypt folders. Looking at the logs I saw a FileNotFound error when trying to look for a cert inside the letsencrypt/npm32/ folder.. but there is no npm32 fodler at all.

To work around the error, I copied an existing letsencrypt/npm31/ folder to letsencrypt/npm32/ to get past the FileNotFound error. That actually worked! the container isn't stuck in a permanent loop and I can log in again.

However, there's a new problem with the front end. When I try to add a proxy_host or anything that opens a popup, I get the following client-side error

image

I will open anew issue as this is no longer related to the error you're having and I don't want to add noise to your case :)

<!-- gh-comment-id:791495240 --> @LanceMcCarthy commented on GitHub (Mar 5, 2021): I even recreated the container from scratch, it didn't resolve the issue. That led me to look at what is inside the persisted volume's data and letsencrypt folders. Looking at the logs I saw a FileNotFound error when trying to look for a cert inside the `letsencrypt/npm32/` folder.. but there is no npm32 fodler at all. To work around the error, I copied an existing `letsencrypt/npm31/` folder to `letsencrypt/npm32/` to get past the FileNotFound error. That actually worked! the container isn't stuck in a permanent loop and I can log in again. However, there's a new problem with the front end. When I try to add a proxy_host or anything that opens a popup, I get the following client-side error ![image](https://user-images.githubusercontent.com/3520532/110134995-03612380-7d9c-11eb-9032-96b33ccceba3.png) I will open anew issue as this is no longer related to the error you're having and I don't want to add noise to your case :)
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#783
No description provided.