nginx-proxy-manager: Bad Gateway at Admin Page: production.json cannot be read

I have been trying for days to get this to function with SSL. After a couple days it finally worked, but I eventually got “internal error” when trying to obtain an SSL for one of the proxies. I then tried to reinstall, but now I get “Bad Gateway” when trying to login to the admin portal.

Portainer shows the desktop_app_1 container is unhealthy and shows an error of “parse error: Invalid numeric literal at line 1, column 7 NOT OK”.

Docker version 19.03.8, build afacb8b7f0 Ubuntu LTS 18.04 docker-compose version 1.25.4, build 8d51620a

Please help. I have a domain I paid for that also has an SSL through dnsimple.

docker-compose.yaml
version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - ./config.json:/app/config/production.json
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
  db:
    image: 'jc21/mariadb-aria:10.4'
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
    volumes:
      - ./data/mysql:/var/lib/mysql
desktop_db1_ output
[i] mysqld not found, creating....,
[i] MySQL data directory not found, creating initial DBs,
 Creating database: npm,
[i] with character set: 'utf8' and collation: 'utf8_general_ci',
[i] Creating user: npm with password npm,
2020-03-20  7:27:32 0 [Note] /usr/bin/mysqld (mysqld 10.4.10-MariaDB) starting as process 70 ...,
2020-03-20  7:27:32 0 [Note] InnoDB: Using Linux native AIO,
2020-03-20  7:27:32 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins,
2020-03-20  7:27:32 0 [Note] InnoDB: Uses event mutexes,
2020-03-20  7:27:32 0 [Note] InnoDB: Compressed tables use zlib 1.2.11,
2020-03-20  7:27:32 0 [Note] InnoDB: Number of pools: 1,
2020-03-20  7:27:32 0 [Note] InnoDB: Using SSE2 crc32 instructions,
2020-03-20  7:27:32 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts),
2020-03-20  7:27:32 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M,
2020-03-20  7:27:32 0 [Note] InnoDB: Completed initialization of buffer pool,
2020-03-20  7:27:32 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().,
2020-03-20  7:27:32 0 [Note] InnoDB: 128 out of 128 rollback segments are active.,
2020-03-20  7:27:32 0 [Note] InnoDB: Creating shared tablespace for temporary tables,
2020-03-20  7:27:32 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...,
2020-03-20  7:27:32 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.,
2020-03-20  7:27:32 0 [Note] InnoDB: 10.4.10 started; log sequence number 139836; transaction id 21,
2020-03-20  7:27:32 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool,
2020-03-20  7:27:32 0 [Note] Plugin 'FEEDBACK' is disabled.,
2020-03-20  7:27:32 0 [Note] InnoDB: Buffer pool(s) load completed at 200320  7:27:32,
2020-03-20  7:27:32 6 [Warning] 'user' entry '@21b64543b884' ignored in --skip-name-resolve mode.,
2020-03-20  7:27:32 6 [Warning] 'proxies_priv' entry '@% root@21b64543b884' ignored in --skip-name-resolve mode.,
2020-03-20  7:27:32 6 [Warning] 'user' entry '@21b64543b884' ignored in --skip-name-resolve mode.,
2020-03-20  7:27:32 6 [Warning] 'proxies_priv' entry '@% root@21b64543b884' ignored in --skip-name-resolve mode.,
/scripts/run.sh: ignoring or entrypoint initdb empty /docker-entrypoint-initdb.d/*,
,
,
MySQL init process done. Ready for start up.,
,
exec /usr/bin/mysqld --user=mysql --console --skip-name-resolve --skip-networking=0,
2020-03-20  7:27:34 0 [Note] /usr/bin/mysqld (mysqld 10.4.10-MariaDB) starting as process 1 ...,
2020-03-20  7:27:34 0 [Note] InnoDB: Using Linux native AIO,
2020-03-20  7:27:34 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins,
2020-03-20  7:27:34 0 [Note] InnoDB: Uses event mutexes,
2020-03-20  7:27:34 0 [Note] InnoDB: Compressed tables use zlib 1.2.11,
2020-03-20  7:27:34 0 [Note] InnoDB: Number of pools: 1,
2020-03-20  7:27:34 0 [Note] InnoDB: Using SSE2 crc32 instructions,
2020-03-20  7:27:34 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts),
2020-03-20  7:27:34 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M,
2020-03-20  7:27:34 0 [Note] InnoDB: Completed initialization of buffer pool,
2020-03-20  7:27:34 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().,
2020-03-20  7:27:34 0 [Note] InnoDB: 128 out of 128 rollback segments are active.,
2020-03-20  7:27:34 0 [Note] InnoDB: Creating shared tablespace for temporary tables,
2020-03-20  7:27:34 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...,
2020-03-20  7:27:34 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.,
2020-03-20  7:27:34 0 [Note] InnoDB: 10.4.10 started; log sequence number 139845; transaction id 21,
2020-03-20  7:27:34 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool,
2020-03-20  7:27:34 0 [Note] Plugin 'FEEDBACK' is disabled.,
2020-03-20  7:27:34 0 [Note] InnoDB: Buffer pool(s) load completed at 200320  7:27:34,
2020-03-20  7:27:34 0 [Note] Server socket created on IP: '::'.,
2020-03-20  7:27:34 0 [Warning] 'user' entry '@21b64543b884' ignored in --skip-name-resolve mode.,
2020-03-20  7:27:34 0 [Warning] 'proxies_priv' entry '@% root@21b64543b884' ignored in --skip-name-resolve mode.,
2020-03-20  7:27:34 0 [Note] Reading of all Master_info entries succeeded,
2020-03-20  7:27:34 0 [Note] Added new Master_info '' to hash table,
2020-03-20  7:27:34 0 [Note] /usr/bin/mysqld: ready for connections.,
Version: '10.4.10-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server,

desktop_app_1 output:

[3/20/2020] [7:28:38 AM] [Global   ] › ✖  error     Config file /app/config/production.json cannot be read. Error code is: EISDIR. Error message is: EISDIR: illegal operation on a directory, read Error: Config file /app/config/production.json cannot be read. Error code is: EISDIR. Error message is: EISDIR: illegal operation on a directory, read
    at Config.util.parseFile (/app/node_modules/config/lib/config.js:771:13)
    at /app/node_modules/config/lib/config.js:601:26
    at Array.forEach (<anonymous>)
    at Config.util.loadFileConfigs (/app/node_modules/config/lib/config.js:600:16)
    at new Config (/app/node_modules/config/lib/config.js:116:27)
    at Object.<anonymous> (/app/node_modules/config/lib/config.js:1441:31)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
    at Module.load (internal/modules/cjs/loader.js:914:32)
    at Function.Module._load (internal/modules/cjs/loader.j

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 42 (1 by maintainers)

Most upvoted comments

After a low of troubles someone suggested the following config. The difference is that is uses another container for the database that supports arm and I think that the important thing is the is uses version 2 instead of 3.

version: "2"
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: always
    ports:
      # Public HTTP Port:
      - '80: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"
      DISABLE_IPV6: 'true'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - db
  db:
    image: yobasystems/alpine-mariadb:latest
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
    volumes:
      - ./data/mysql:/var/lib/mysql

Fixed my by changing the db host from “db” to the local ip.

@ anselal Thank you so much! After a few attempts to modify this, this worked. Thank you and everybody for figuring this out!

docker-compose up -d created a directory config.json/ instead of a file. stop containers sudo rm -r config.json directory create config.json file with: { “database”: { “engine”: “mysql”, “host”: “db”, “name”: “npm”, “user”: “npm”, “password”: “npm”, “port”: 3306 } }