Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to login #11

Closed
razzam21 opened this issue Sep 3, 2018 · 7 comments
Closed

Unable to login #11

razzam21 opened this issue Sep 3, 2018 · 7 comments

Comments

@razzam21
Copy link

razzam21 commented Sep 3, 2018

NOTE: This is a first time trying to log in after deploying the container.

"Internal error" appears on the screen after entering the provided username and password.

This line appears in the logs.
[9/3/2018] [12:18:47 PM] [Express ] › ⚠ warning Configuration property "jwt.pub" is not defined

@jc21
Copy link
Member

jc21 commented Sep 3, 2018

A few questions...

  1. Do you definitely have a config json file mounted as /app/config/production.json ?
  2. Are you importing from a version 1 configuration?

@razzam21
Copy link
Author

razzam21 commented Sep 3, 2018

  1. I see in the logs that the system modified the config.json that I pointed at /app/config/production.json. I am guessing it is doing that part like it is supposed to. It added a jwt section with keys and then acts like it can't find them.

It now looks like this:

{
"database": {
"engine": "mysql",
"host": "10.10.10.200",
"name": "nginx",
"user": "nginx",
"password": "nginx",
"port": 3306
},
"jwt": {
"key": "-----BEGIN RSA PRIVATE KEY-----[lots of characters]-----END RSA PRIVATE KEY-----",
"pub": "-----BEGIN PUBLIC KEY-----[lots of characters]----END PUBLIC KEY-----"
}
}

  1. No I am not importing. This is a clean build/install.

@jc21
Copy link
Member

jc21 commented Sep 4, 2018

That is very strange. I've just tested a clean install with the latest image and things are working fine. The fact that it wrote the keys to the file means it should be able to read from them. If you're using docker-compose, can you attach the output of this command: docker-compose config

Here's mine:

services:
  app:
    depends_on:
    - db
    environment:
      FORCE_COLOR: '1'
    image: jc21/nginx-proxy-manager:2
    ports:
    - 80:80/tcp
    - 81:81/tcp
    - 443:443/tcp
    restart: always
    volumes:
    - /opt/nginx-proxy-manager/config.json:/app/config/production.json:rw
    - /opt/nginx-proxy-manager/data:/data:rw
    - /opt/nginx-proxy-manager/letsencrypt:/etc/letsencrypt:rw
  db:
    environment:
      MYSQL_DATABASE: npm
      MYSQL_PASSWORD: npm
      MYSQL_ROOT_PASSWORD: npm
      MYSQL_USER: npm
    image: mariadb:10.3.7
    restart: always
    volumes:
    - /opt/nginx-proxy-manager/data/mysql:/var/lib/mysql:rw
version: '2.0'

Perhaps

@SGStino
Copy link

SGStino commented Sep 7, 2018

seeing the same issue, no docker compose was used.
However, recreating the container did solve the issue.

@razzam21
Copy link
Author

razzam21 commented Sep 7, 2018

Sorry about the delay. I am not using docker-compose.

@Aerya
Copy link

Aerya commented Sep 11, 2018

I had to restart the container too. Then it's okay.

@razzam21
Copy link
Author

I came back to it a couple of days later and it is working now. Weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants